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

io.skymap.read_skymap(): no_hdu parameter #159

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Theodlz
Copy link
Collaborator

@Theodlz Theodlz commented Dec 2, 2024

We avoided memory issues in SkyPortal (in production) by dropping the hdu variable (and others) created by gwemopt when reading a skymap before calling the scheduler, however just creating the variable can require some amount of memory and create issues, so this PR simply adds an argument to avoid creating said variable altogether. The default is to still create it (to not impact any existing workflows), but one can explicitly avoid it by setting that new optional flag to True.

I also rearranged a few things in that function + fixed one line that looked suspicious to me (where the skymap_schedule variable was set using the skymap_raster and not the skymap_raster_schedule).

…her heavy hdu variable if not necessarily (plotting only)
@Theodlz Theodlz requested a review from mcoughlin December 2, 2024 23:27
Copy link
Collaborator

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

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

Thanks @Theodlz

@Theodlz
Copy link
Collaborator Author

Theodlz commented Dec 2, 2024

@mcoughlin there are a few other variables: skymap_raster, skymap_raster_schedule, center that are only useful if:

  • skymap_raster: computing efficiency
  • center: plotting
  • skymap_raster_schedule: reading a galaxy catalog (only when calling gwemopt's run.py)

so I think I can make this even more modular based on what's needed downstream, let's not merge it yet

@Theodlz
Copy link
Collaborator Author

Theodlz commented Dec 3, 2024

Ok just made that change, I'll wrap it up tomorrow and make a release this week ideally

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