imSim icon indicating copy to clipboard operation
imSim copied to clipboard

Delay read of instcat until data is needed

Open rmjarvis opened this issue 1 year ago • 2 comments

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.

rmjarvis avatar Apr 23 '24 19:04 rmjarvis

Now the catalog is read once for a single CCD

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

esheldon avatar Apr 24 '24 16:04 esheldon

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.

rmjarvis avatar Apr 24 '24 19:04 rmjarvis