lsst-epo / citizen-science-notebooks

A collection Jupyter notebooks that can be used to associate Rubin Science Platform data to a Zooniverse citizen science project.
3 stars 1 forks source link

Try out proposed workflow for Image Cutout Service for 10k cutouts use case #113

Open ericdrosas87 opened 3 days ago

ericdrosas87 commented 3 days ago

User story

As a PI curating 10k images intended for the Zooniverse platform, I would like to have the ability to run a cell to curate all 10k images and close out the tab/walk away from my laptop and come back when it's done processing without the Notebook kernel crashing.

Definition of done

I have evaluated whether the proposed workflow for the Image Cutout Service will suit the use case of curating 10k images at once.

ericdrosas87 commented 3 days ago

Suggested workflow:

# store the cutout data in memory:
cutout_bytes = sq.execute_stream().read()
mem = MemFileManager(len(cutout_bytes))
mem.setData(cutout_bytes, len(cutout_bytes))
exposure = ExposureF(mem)

# plot the image:
fig, ax = plt.subplots()
display = afwDisplay.Display(frame=fig)
display.scale('asinh', 'zscale')
display.mtv(exposure.image)
plt.show()