-
Notifications
You must be signed in to change notification settings - Fork 4
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/nsides #63
Conversation
like sed_val_bulge (an array of lists) for the subpixels. Try compressing before doing the transform.
A couple minor fixes in CatalogCreator._ceate_galaxy_flux_pixel: * don't need while loop; just output a row group the same size as for main file * set minimum timeout value for chunks > 0
self._out_pixels = out_pixels | ||
skip_count = 0 | ||
for p in out_pixels: | ||
output_path = os.path.join(self._output_dir, f'galaxy_{p}.parquet') |
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.
It would very convenient for scanning file names of these parquet files if the pixel number could be formatted with leading zeros so that file names like galaxy_09556.parquet
are listed before galaxy_10000.parquet
when sorted. Some code like this would accomplish that:
digits = len(str(healpy.nside2npix(nside)))
f'galaxy_{p:0{digits}d}.parquet'
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 would also need something comparable in the code that searches for files. For backwards compatibility that code should accept either form. Better, the templates in the yaml config could be modified to accept either form. However there are places where the code has to know whether or not the file for a particular pixel already exists so as not to overwrite it or allow two versions of the same thing.
This is getting complicated enough that I'm inclined to put it in a separate PR.
Since we'll be changing the galaxy SED model soon, and since so much code has been added/changed here having to do with the top hat SEDs, this seems like a good opportunity to refactor the catalog_creator.py code to remove the assumption that top hat SEDs will be used for galaxies. So, I'd suggest making |
Concerning your comment about tophat SEDs - yes, the current assumptions about tophat SEDs will have to go, but there will be other changes involved in supporting multiple galaxy types. I'd rather deal with them together (as they are likely inter-related) in a separate PR. |
Add options to the catalog creation script, applying to galaxies only, which