You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when I pass in a big flux array, it takes a while to create the Spectrum1D object. I am not even doing anything with it yet, just initializing it. Is it possible for it to be as lazy as possible? If so, is such performance tips documented somewhere?
fromastropyimportunitsasufromastropy.ioimportfitsfromastropy.wcsimportWCSfromspecutilsimportSpectrum1Dfilename="ADP.2016-06-17T18_47_32.888.fits"# 3 GB, 2 extensions each (321, 315, 3682) float32pf=fits.open(filename)
wcs=WCS(pf[1].header)
flux=pf[1].data<<u.Unit(pf[1].header["BUNIT"]) # This is fastsp=Spectrum1D(flux=flux, wcs=wcs) # Takes a long time
I noticed that when I pass in a big flux array, it takes a while to create the Spectrum1D object. I am not even doing anything with it yet, just initializing it. Is it possible for it to be as lazy as possible? If so, is such performance tips documented somewhere?
Example usage
Data file is from http://archive.eso.org/wdb/wdb/adp/phase3_main/query?collection_name=MUSE&version=&object===HE%202302-0857&order_main=wavelmin%2Cfilter%2Cexp_start%2Cexptime%2Corigfile&top=10000
xref spacetelescope/jdaviz#2502
The text was updated successfully, but these errors were encountered: