Message Boards Message Boards

6
|
16093 Views
|
5 Replies
|
19 Total Likes
View groups...
Share
Share this post:

Using Map projections with Astronomical data

Posted 10 years ago
POSTED BY: Marcelo De Cicco
5 Replies
Posted 10 years ago

Just a note:

triplets[[;;, 3]] = Rescale @ triplets[[;;, 3]]

will be faster.

POSTED BY: Kuba Podkalicki

Thanks Jeff.

POSTED BY: Marcelo De Cicco

To add to Jose's response, if you want to color the points different colors efficiently, you can redefine p as follows (there may be a shorter way, but this works):

p = With[{triples = 
    Cases[rad, {a_, b_, c_?NumberQ} :> {b, Mod[a, 360, -180], c}]}, 
  triples /. {a_, b_, c_} :> {a, b, 
     Rescale[c, {Min[triples[[All, 3]]], Max[triples[[All, 3]]]}]}];

Then, you can generate colors for each of the triples:

colors = ColorData["TemperatureMap"][#] & /@ p[[All, 3]];

The colors can be efficiently applied using VertexColors on the Point primitive:

GeoGraphics[{PointSize[0.01], 
  Point[GeoPosition[p[[All, 1 ;; 2]]], VertexColors -> colors]}, 
 GeoRange -> All, GeoProjection -> "Sinusoidal", 
 GeoGridLines -> Automatic, 
 GeoGridLinesStyle -> Directive[Dashing[{.01, .005}], Green], 
 GeoBackground -> Black]

enter image description here

POSTED BY: Jeffrey Bryant

Fine! And what about colorizing the points? In geographic functions is allowed to do this?

See these other results from Kuba:

Kuba `s way

POSTED BY: Marcelo De Cicco

Starting from your proposed solution I would suggest the following simplification. A single GeoGraphics can produce the desired output and handles everything related to the projection. In version 10.0.2 GeoProjectionData also has the "Hammer" (or Hammer-Aitoff) and "Aitoff" projections.

rad = Import["~/Downloads/DadosRad2014_RADECVELOC_15124_1024.dat"];
p = Cases[rad, {a_, b_, c_} -> {b, Mod[a, 360, -180]}];

GeoGraphics[{Red, PointSize[0.01], Point[GeoPosition[p]]}, 
 GeoRange -> All, GeoProjection -> "Sinusoidal", 
 GeoGridLines -> Automatic, GeoGridLinesStyle -> Directive[Dashing[{.01, .005}], Green], 
 GeoBackground -> Black
]

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract