def make_hansuchik(self): """Make Hansuchik.FITS file""" # Hansuchik.py -> HansuchikUVES.FITS from Data.Hansuchik import uves_sky HansuchikUVES = SpectraStack(filename=self.config["Dirs"]["Data"] + "/UVESSky.fits") HansuchikUVES.save(uves_sky.T,"UVESSky") HansuchikUVES.write(clobber=True)
def make_palsky(self): """Make palsky.FITS file""" # palsky_100318.dat -> Palsky.FITS palskydata = np.genfromtxt(self.config["Dirs"]["Data"] + "/palsky_100318.dat").T palSKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/PalSky.fits") palSKY.save(palskydata,"PalSky") palSKY.write(clobber=True)
def make_atmosphere(self): """Make Atmosphere.FITS file""" # atmosphere.py -> atmosphere.FITS from Data.atmosphere import palextinct atmosphereEXT = SpectraStack(filename=self.config["Dirs"]["Data"] + "/atmosphere.fits") atmosphereEXT.save(palextinct.T,"Atmosph") atmosphereEXT.write(clobber=True)
def make_quimby(self): """Make Quimby.FITS file""" # Quimby.py -> QuimbySky.FITS from Data.Quimby import quimby_sky QuimbySKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/QuimbySky.fits") QuimbySKY.save(quimby_sky.T,"QuimbySky") QuimbySKY.write(clobber=True)
def make_turnrose(self): """Make Turnrose.FITS file""" # Turnrose.py -> Turnrose.FITS from Data.Turnrose import skyspec TurnroseSKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/TurnroseSKY.fits") TurnroseSKY.save(skyspec.T,"TurnroseSKY") TurnroseSKY.write(clobber=True)
def make_massey(self): """Make the Massey.FITS file""" # Massey.py -> MasseySky.FITS from Data.massey import skyab # Convert some sky spec from AB to fLambda # This sky spectrum is imported from the massey module, and uses the mag conversion functions above. skyflam = np.array([skyab[:,0], abmag_to_flambda(skyab[:,1], skyab[:,0])]) MasseySky = SpectraStack(filename=self.config["Dirs"]["Data"] + "/MasseySky.fits") MasseySky.save(skyab.T,"SkyAB") MasseySky.save(skyflam,"SkyFL") MasseySky.write(clobber=True)
def make_atmosphere(self): """Make Atmosphere.FITS file""" # atmosphere.py -> atmosphere.FITS from Data.atmosphere import palextinct atmosphereEXT = SpectraStack(filename=self.config["Dirs"]["Data"] + "/atmosphere.fits") atmosphereEXT.save(palextinct.T, "Atmosph") atmosphereEXT.write(clobber=True)
def make_quimby(self): """Make Quimby.FITS file""" # Quimby.py -> QuimbySky.FITS from Data.Quimby import quimby_sky QuimbySKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/QuimbySky.fits") QuimbySKY.save(quimby_sky.T, "QuimbySky") QuimbySKY.write(clobber=True)
def make_turnrose(self): """Make Turnrose.FITS file""" # Turnrose.py -> Turnrose.FITS from Data.Turnrose import skyspec TurnroseSKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/TurnroseSKY.fits") TurnroseSKY.save(skyspec.T, "TurnroseSKY") TurnroseSKY.write(clobber=True)
def make_hansuchik(self): """Make Hansuchik.FITS file""" # Hansuchik.py -> HansuchikUVES.FITS from Data.Hansuchik import uves_sky HansuchikUVES = SpectraStack(filename=self.config["Dirs"]["Data"] + "/UVESSky.fits") HansuchikUVES.save(uves_sky.T, "UVESSky") HansuchikUVES.write(clobber=True)
def make_palsky(self): """Make palsky.FITS file""" # palsky_100318.dat -> Palsky.FITS palskydata = np.genfromtxt(self.config["Dirs"]["Data"] + "/palsky_100318.dat").T palSKY = SpectraStack(filename=self.config["Dirs"]["Data"] + "/PalSky.fits") palSKY.save(palskydata, "PalSky") palSKY.write(clobber=True)
def make_massey(self): """Make the Massey.FITS file""" # Massey.py -> MasseySky.FITS from Data.massey import skyab # Convert some sky spec from AB to fLambda # This sky spectrum is imported from the massey module, and uses the mag conversion functions above. skyflam = np.array( [skyab[:, 0], abmag_to_flambda(skyab[:, 1], skyab[:, 0])]) MasseySky = SpectraStack(filename=self.config["Dirs"]["Data"] + "/MasseySky.fits") MasseySky.save(skyab.T, "SkyAB") MasseySky.save(skyflam, "SkyFL") MasseySky.write(clobber=True)
from AstroObject.AstroObjectLogging import * from AstroObject.AnalyticSpectra import InterpolatedSpectrum,GaussianSpectrum,FlatSpectrum,BlackBodySpectrum,UnitarySpectrum,Resolver from AstroObject.AstroSpectra import SpectraStack LOG = logging.getLogger('AstroObject') LOG.configure() LOG.start() WAVELENGTHS = ((np.arange(98)+1)/2.0 + 1.0) * 1e-7 HIGH_R =WAVELENGTHS[1:]/np.diff(WAVELENGTHS) WAVELENGTHS_LOWR = ((np.arange(23)+0.25)*2.0 + 1.0) * 1e-7 LOWR = WAVELENGTHS_LOWR[1:]/np.diff(WAVELENGTHS_LOWR)/2 VALID = np.array([(np.arange(50) + 1.0) * 1e-7, np.sin(np.arange(50)/2.0)+2.0 + np.arange(50)/25.0]) OBJECT = SpectraStack() OBJECT["Raw Data"] = VALID OBJECT.show() OBJECT["Interpolated"] = InterpolatedSpectrum(VALID,label="Interpolated") OBJECT.show() OBJECT["Post Interpolation"] = OBJECT.frame()(wavelengths=WAVELENGTHS) OBJECT.show() OBJECT["Resampled"] = OBJECT.frame("Interpolated")(wavelengths=WAVELENGTHS_LOWR[1:],resolution=LOWR,method='resample') OBJECT.show() plt.legend() plt.figure(2) OBJECT["Integrated"] = OBJECT.frame("Interpolated")(wavelengths=WAVELENGTHS[1:],resolution=HIGH_R,method='integrate') OBJECT.show() OBJECT["Integrated Quad"] = OBJECT.frame("Interpolated")(wavelengths=WAVELENGTHS[1:],resolution=HIGH_R,method='integrate_quad') OBJECT.show()