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

U/jrbogart/create reorg #120

Merged
merged 12 commits into from
Sep 18, 2024
Merged

U/jrbogart/create reorg #120

merged 12 commits into from
Sep 18, 2024

Conversation

JoanneBogart
Copy link
Collaborator

Chiefly this addresses issue #119. The old script create_sc.py is replaced by create_main.py and create_flux.py. Also the bulk of the implementation which had been in catalog_creator.py is now split into main_catalog_creator.py and flux_catalog_creator.py.
SSOs were mostly handled in a separate file, sso_catalog_creator.py. This is still the case, but the old class SsoCatalogCreator has been replaced by classes SsoMainCatalogCreator and SsoFluxCatalogCreator. This was made simpler by addressing a couple of the items in issue #87. The solar SED is now kept in the repo as a text file which galsim can read directly. And the path to SSO truth may now be passed in as an argument to the create script, as is the case for other object types.
This update just reorganizes code and should not change any values in output skyCatalogs (except possibly metadata). In order to make it easy to confirm that, I've added a script compare.py

@JoanneBogart JoanneBogart mentioned this pull request Sep 11, 2024
4 tasks
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.

Looks fine. I have a comment about combining some repeated code. Also, as we discussed, consider using the galsim.SED.thin() function to reduce the size of the solar_sed.txt file.

return out_dict


def _do_star_flux_chunk(send_conn, star_collection, instrument_needed,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code for _do_galaxy_flux_chunk and _do_star_flux_chunk seems to be identical except for the column name for the id field. Can we just have one function that passes that column name as a parameter?

2. Eliminate unused --dc2 option from create_flux.py
@JoanneBogart JoanneBogart merged commit 30380be into main Sep 18, 2024
1 check passed
@JoanneBogart JoanneBogart deleted the u/jrbogart/create_reorg branch September 18, 2024 23:01
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