-
Notifications
You must be signed in to change notification settings - Fork 5
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
Sso initial #86
Sso initial #86
Conversation
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 have a number of change requests.
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.
There are still un-addressed comments from before, one of which--setting streak=True
--definitely needs to be changed otherwise we can't run with the SSO objects being rendered as trailed objects. There is also a new coding error in calling np.arctan2
.
skycatalogs/objects/sso_object.py
Outdated
return SsoObject._solar_sed, self.get_native_attribute('trailed_source_mag') | ||
|
||
def get_gsobject_components(self, gsparams=None, rng=None, | ||
streak=False): |
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.
This still needs to be changed to streak=True
.
dec = self.dec | ||
# Convert from (arc?)degrees/day to arcsec/sec | ||
ra_rate = self.get_native_attribute('ra_rate')/24.0 | ||
# Take out factor of cos(dec). |
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.
Either way. It would be better not to have to deal with it here.
skycatalogs/objects/sso_object.py
Outdated
sed, magnorm = self._get_sed(mjd=mjd) | ||
|
||
flux_500 = np.exp(-0.9210340371976184 * magnorm) | ||
sed = sed.withMagnitude(0, self._bp500) |
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.
Sure, it would make things much clearer there as well.
|
||
class SsoCatalogCreator: | ||
_sso_truth = '/sdf/home/j/jrb/rubin-user/sso/input/20feb2024' | ||
_sso_sed = '/sdf/home/j/jrb/rubin-user/sso/sed/solar_sed.db' |
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.
Since they are supposed to be default values, it seems like it would better to make these the default values in the create_sc.py
script rather than putting them here.
skycatalogs/objects/sso_object.py
Outdated
gobj = gobj.rotate(angle_rad) | ||
else: | ||
# Treat as point source | ||
return {'this_object': galsim.DeltaFunction(gsparams=gsparams)} | ||
|
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 just noticed that the upper part of the if/else
doesn't return anything. The line
return {'this_object': gobj}
was deleted from the previous version.
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.
..which explains an unexpected error I was getting in my test program. Good catch!
Support for SSO objects