chihway / ClusterProfiles

0 stars 0 forks source link

Cluster ellipticity #8

Open bhuvjain opened 5 years ago

bhuvjain commented 5 years ago

About half the cluster contours seem elongated. Worth checking if its a coordinate issue. If it is real, it suggests we should plot the two quadrants along and perpedincular to the major axis separately..

chihway commented 5 years ago

I think it's not really a problem of the coordinate, more like an artifact of the way I'm plotting it (I just did a scatter plot of RA/DEC so the stuff near the pole is distorted), if you just calculate e.g. the second moments of the map using the pixel RA/DEC you should get no distortion. Alternatively, if you want to make plots that are not distorted you can do some flat-sky projection anchored on the center of the cluster.

Try e.g. plotting a scatter plot of ra_proj, dec_proj with ra_proj = (ra-ra0)cos(dec0) dec_proj = dec-dec0 where ra0, dec0 is the coordinate of the cluster

tdacunha commented 5 years ago

Since the coordinates used in the original scatter plot were galactic latitude and longitude I tried to implement the flat-sky projection (using the equations you gave above) with those, does that make sense to do at all since they are different coordinate systems? These are the plots I got for cluster 7 (with equally spaced axes), is this anywhere near what the projected is supposed to look like?

Screen Shot 2019-05-16 at 2 57 13 PM

Screen Shot 2019-05-16 at 2 57 50 PM

Screen Shot 2019-05-16 at 2 59 56 PM

chihway commented 5 years ago

@tdacunha I think you caught a bug of mine :) so I should be plotting

mplot.scatter(lon_y[mask_cluster], (90. - lat_y[mask_cluster]), c=sz_map[mask_cluster], cmap='nipy_spectral')

instead of

mplot.scatter(lat_y[mask_cluster], (90. - lon_y[mask_cluster]), c=sz_map[mask_cluster], cmap='nipy_spectral')

I think the lon --> RA lat --> DEC should hold... can you try it again? also I can't tell from your code, but np.cos() takes in angles in radians, so make sure you convert it if not already.

tdacunha commented 5 years ago

Ok editing it now! Quick question though, why is the lat_y subtracted from 90 degrees in the scatter plot? Wasn't theta_y already subtracted from 90 to get lat_y?

chihway commented 5 years ago

you're right, that's not necessary

tdacunha commented 5 years ago

Ok here are some of the originals and projected plots: Cluster 0 Screen Shot 2019-05-17 at 11 51 31 AM Screen Shot 2019-05-17 at 11 51 40 AM Cluster 1 Screen Shot 2019-05-17 at 11 52 12 AM Screen Shot 2019-05-17 at 11 52 19 AM Cluster 2 Screen Shot 2019-05-17 at 11 52 58 AM Screen Shot 2019-05-17 at 11 53 02 AM Cluster 5 Screen Shot 2019-05-17 at 11 54 02 AM Screen Shot 2019-05-17 at 11 54 07 AM

tdacunha commented 5 years ago

Here are the stacks with all 10 clusters: Screen Shot 2019-05-31 at 10 25 55 AM

Here is what it would be if we cherrypicked the same ones as when we were originally stacking: Screen Shot 2019-05-31 at 10 29 53 AM