Skip to content
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

Merged
merged 32 commits into from
Mar 4, 2024
Merged

Sso initial #86

merged 32 commits into from
Mar 4, 2024

Conversation

JoanneBogart
Copy link
Collaborator

Support for SSO objects

Copy link
Collaborator

@jchiang87 jchiang87 left a 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.

skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
skycatalogs/skyCatalogs.py Outdated Show resolved Hide resolved
skycatalogs/skyCatalogs.py Outdated Show resolved Hide resolved
skycatalogs/skyCatalogs.py Outdated Show resolved Hide resolved
skycatalogs/skyCatalogs.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jchiang87 jchiang87 left a 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.

return SsoObject._solar_sed, self.get_native_attribute('trailed_source_mag')

def get_gsobject_components(self, gsparams=None, rng=None,
streak=False):
Copy link
Collaborator

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.

skycatalogs/objects/sso_object.py Outdated Show resolved Hide resolved
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).
Copy link
Collaborator

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.

sed, magnorm = self._get_sed(mjd=mjd)

flux_500 = np.exp(-0.9210340371976184 * magnorm)
sed = sed.withMagnitude(0, self._bp500)
Copy link
Collaborator

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'
Copy link
Collaborator

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.

Comment on lines 80 to 84
gobj = gobj.rotate(angle_rad)
else:
# Treat as point source
return {'this_object': galsim.DeltaFunction(gsparams=gsparams)}

Copy link
Collaborator

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.

Copy link
Collaborator Author

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!

@JoanneBogart JoanneBogart merged commit 4be8699 into main Mar 4, 2024
1 check failed
@JoanneBogart JoanneBogart deleted the sso_initial branch April 24, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants