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

Delay read of instcat until data is needed #466

Merged
merged 3 commits into from
Jun 6, 2024
Merged

Conversation

rmjarvis
Copy link
Contributor

Address #464 take two.

I removed the approx_nobject keyword, and now implement getApproxNObjects() by just counting the lines in the instance catalog file. This will always be >= the number of objects in that file that fall on the image, so it works as a good approx value. And it's quite fast, so should address the original problem about reading the file twice taking a long time.

@esheldon
Copy link
Contributor

Now the catalog is read once for a single CCD

However it is still reading it again for each CCD that is simulated.

@rmjarvis
Copy link
Contributor Author

However it is still reading it again for each CCD that is simulated.

Yes, it selects the galaxies in the input catalog that will fall on (or near) the CCD, so that is required.

Copy link
Member

@jmeyers314 jmeyers314 left a comment

Choose a reason for hiding this comment

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

LGTM.

@rmjarvis rmjarvis merged commit 25f868b into main Jun 6, 2024
3 checks passed
@rmjarvis rmjarvis deleted the instcat_delay_read branch June 6, 2024 16:06
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.

3 participants