-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ellipticity, position angle correction in protodc2 GCR. #48
Conversation
…ed Sersic index into the morphology group.
…g versions supported are explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dkorytov. I've made some inline comments.
GCRCatalogs/alphaq.py
Outdated
@@ -65,7 +66,9 @@ def _subclass_init(self, filename, **kwargs): | |||
'size_bulge_true': 'morphology/spheroidHalfLightRadius', | |||
'disk_sersic_index': 'morphology/diskSersicIndex', | |||
'bulge_sersic_index': 'morphology/spheroidSersicIndex', | |||
'ellipticity_1': 'morphology/totalEllipticity1', | |||
'position_angle': (lambda pos_angle: pos_angle*(180.0/np.pi)**2,'morphology/positionAngle'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please confirm if
**2
in this formula is correct - use
np.rad2deg
instead of*(180.0/np.pi)
- Please add one space after comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I incorrectly converted the units, so I have apply the conversion twice. The position angle comes out 0->180. I can apply the function twice...
GCRCatalogs/alphaq.py
Outdated
@@ -65,7 +66,9 @@ def _subclass_init(self, filename, **kwargs): | |||
'size_bulge_true': 'morphology/spheroidHalfLightRadius', | |||
'disk_sersic_index': 'morphology/diskSersicIndex', | |||
'bulge_sersic_index': 'morphology/spheroidSersicIndex', | |||
'ellipticity_1': 'morphology/totalEllipticity1', | |||
'position_angle': (lambda pos_angle: pos_angle*(180.0/np.pi)**2,'morphology/positionAngle'), | |||
'ellipticity_1': (lambda ellip2, pos_angle : ellip2/np.tan(2*pos_angle*(180.0/np.pi)) , 'morphology/totalEllipticity2','morphology/positionAngle'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- use
np.rad2deg
instead of*(180.0/np.pi)
- Please add one space after commas, and remove spaces before commas
- Please remove the space before colon
GCRCatalogs/alphaq.py
Outdated
'ellipticity_1': 'morphology/totalEllipticity1', | ||
'position_angle': (lambda pos_angle: pos_angle*(180.0/np.pi)**2,'morphology/positionAngle'), | ||
'ellipticity_1': (lambda ellip2, pos_angle : ellip2/np.tan(2*pos_angle*(180.0/np.pi)) , 'morphology/totalEllipticity2','morphology/positionAngle'), | ||
'size_true': (lambda size1,size2,lum1,lum2: ((size1*lum1)+(size2*lum2))/(lum1+lum2),'morphology/diskHalfLightRadius','morphology/spheroidHalfLightRadius','LSST_filters/diskLuminositiesStellar:LSST_r:rest','LSST_filters/spheroidLuminositiesStellar:LSST_r:rest'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Please add one space after commas
GCRCatalogs/alphaq.py
Outdated
@@ -12,6 +12,7 @@ | |||
__all__ = ['AlphaQGalaxyCatalog'] | |||
|
|||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a line __version__ = '2.1.1.1'
(or your preferred versioning scheme) to indicate the version of this reader file.
GCRCatalogs/alphaq.py
Outdated
@@ -74,7 +77,7 @@ def _subclass_init(self, filename, **kwargs): | |||
'velocity_y': 'vy', | |||
'velocity_z': 'vz', | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove unneeded space
GCRCatalogs/alphaq.py
Outdated
self.sky_area = fh['metaData/skyArea'].value | ||
else: | ||
self.sky_area = 25 #If the sky area isn't specified use the default value of the sky area. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add self.sky_area = float(self.sky_area)
to ensure it is a float
No description provided.