astro.main package

Subpackages

Submodules

astro.main.ApertureCorrectionAttributeCalculator module

astro.main.AssociateList module

astro.main.AssociateListNew module

astro.main.Astrom module

astro.main.AstrometricCorrection module

astro.main.AstrometricParameters module

astro.main.AstrometricParametersFactory module

astro.main.AstrometricParametersFactory.create_AP()

Instantiate AstrometricParameters object.

astro.main.AtmosphericExtinction module

astro.main.AtmosphericExtinctionCurve module

astro.main.AtmosphericExtinctionFrames module

astro.main.AtmosphericExtinctionZeropoint module

astro.main.AutomaticBitMask module

astro.main.BDSM_Gaussian module

astro.main.BDSM_Shapelet module

astro.main.BPZAttributeCalculator module

astro.main.BackgroundFrame module

astro.main.BaseCatalog module

astro.main.BaseFlatFrame module

astro.main.BaseFrame module

astro.main.BiasFrame module

astro.main.BitMask module

astro.main.BoundingBox module

astro.main.Catalog module

astro.main.CheckImage module

astro.main.Chip module

astro.main.ColdPixelMap module

astro.main.CombinedList module

astro.main.Config module

astro.main.ConvolvedFrame module

astro.main.CosmicMap module

astro.main.CrossTalk module

astro.main.CrossTalkCorrectedFrame module

astro.main.DarkCurrent module

astro.main.DiaConfig module

astro.main.DomeFlatFrame module

astro.main.EMCMap module

astro.main.ESOIDAttributeCalculator module

astro.main.ExtinctionAttributeCalculator module

astro.main.Filter module

astro.main.FringeFrame module

astro.main.GAstrometric module

astro.main.GaAPAttributeCalculator module

astro.main.GainLinearity module

astro.main.GalFitComponent module

astro.main.GalFitModel module

astro.main.GalPhotModel module

astro.main.GaussianizedFrame module

astro.main.HotPixelMap module

astro.main.IlluminationCorrection module

astro.main.IlluminationCorrectionFrame module

astro.main.IlluminationCorrectionOMEGACAM module

astro.main.Imstat module

astro.main.InspectFigure module

astro.main.Instrument module

astro.main.KidsCat module

astro.main.Lamp module

astro.main.LightCurve module

astro.main.LinearityMap module

astro.main.ManualBitMask module

astro.main.MasterFlatFrame module

astro.main.ModifiedFrame module

astro.main.NightSkyFlatFrame module

astro.main.ObservingBlock module

astro.main.OnTheFly module

astro.main.PSFImage module

astro.main.PSFModel module

astro.main.PhotExtinctionCurve module

astro.main.PhotRedCatalog module

astro.main.PhotRefCatalog module

astro.main.PhotSkyBrightness module

astro.main.PhotSrcCatalog module

astro.main.PhotTransformation module

astro.main.PhotometricExtinctionReport module

astro.main.PhotometricParameters module

astro.main.PhotometricReport module

astro.main.PhotometricSkyReport module

astro.main.PixelMap module

astro.main.ProcessTarget module

astro.main.QuickCheckFrame module

astro.main.RPixelMap module

astro.main.RadioCube module

astro.main.RawFinder module

astro.main.RawFitsData module

astro.main.RawFrame module

astro.main.ReadNoise module

astro.main.ReducedScienceFrame module

astro.main.ReferenceFrame module

astro.main.RegriddedFrame module

astro.main.SatelliteMap module

astro.main.SaturatedPixelMap module

astro.main.ShutterCheckFrame module

astro.main.SourceList module

astro.main.SubWinStat module

astro.main.SubWinStatFactory module

astro.main.SubWinStatFactory.create_subwinstat()

Instantiate sub-window statistics object.

astro.main.TinyTimImage module

astro.main.TwilightFlatFrame module

astro.main.TwoDPhotAttributeCalculator module

astro.main.VariabilityFrame module

astro.main.WeightFrame module

astro.main.WorldPositionAngleAttributeCalculator module

astro.main.aweimports module

Module contents

The Persistent Object Hierarchy

This package contains the persistent object hierarchy for OmegaCAM. This hierarchy reflects the data model for the reduction of multi-CCD optical imaging data.

All persistent objects derive from common.database.DBMain.DBObject, The full hierarchy is (objects marked with * have a make method, see below):

DBObject

+DataObject————–+—————+

+–AssociateList * +–Astrom +–BaseCatalog +–AstrometricCorrection * | | +–AstrometricParameters * | | +–BaseAtmostphericExtinction | +–Catalog * | | | | | | +–AtmostphericExtinction * | | +–PhotSrcCatalog * | | | | | | | +–AtmosphericExtinctionFrames * | +–PhotRefCatalog | | +–AtmostphericExtinctionZerpoint * | | | | +–BaseFrame | +–AtmostphericExtinctionCurve * | | | +–AtmosphericExtinctionCoefficient * | +–BaseFlatFrame | | | | +–Chip | | +–DomeFlatFrame * +–Config | | +–MasterFlatFrame * | | | | +–TwilightFlatFrame * | +–AddImageCalibsConfig | | | +–AplastromConfig | +–BiasFrame * | +–AssociateConfig | +–FringeFrame * | +–AstromConfig | +–IlluminationCorrectionFrame * | +–PreastromConfig | +–NightSkyFlatFrame * | +–PrephotomConfig | +–QuickCheckFrame * | +–MakeSscConfig | +–RawFrame * | +–SextractorConfig | | | | +–SwarpConfig | | +–RawBiasFrame * | | | +–RawDarkFrame * +–DarkCurrent * | | +–RawDomeFlatFrame * +–Filter | | +–RawScienceFrame * +–GAstrometric * | | +–RawTwilightFlatFrame * +–DarkCurrent * | | +–Imstat | +–ReducedScienceFrame * +–Instrument | +–RegriddedBaseFrame +–Lamp | | | +–PhotTransformation | | +–CoaddedRegriddedFrame * +–ReadNoise * | | +–RegriddedFrame * +–SubWinStat * | | | +–ShutterCheckFrame * | +–WeightFrame * | +–GainLinearity * +–IlluminationCorrection * +–PhotometricReport | | | +–PhotometricSkyReport | +–PhotExtinctionCurve +–PhotometricExtinctionReport * +–PhotometricParameters * +–PhotSkyBrightness +–PixelMap | | | +–ColdPixelMap * | +–CosmicMap * | +–HotPixelMap * | +–LinearityMap * | +–SatelliteMap * | +–SaturatedPixelMap * | +–RawFitsData +–SourceList *

Some important objects in this hierarchy are:

DBObject - All objects deriving from DBObjects are persistent. Hence, all
these objects can be committed and retrieved from a database
DataObject - All DataObject objects have associated bulk data (FITS files,
catalogs) which can be stored and retrieved from a central data server
BaseFrame - All objects derived from BaseFrame describe the contents of
associated FITS images and have methods that operate on these images
PixelMap - All PixelMap objects are used to indicate bad pixels, to be
assigned a weight of zero in weight images
Catalog - All Catalog objects describe LDAC catalogs and define methods
that operate on these catalogs
Config - These objects store the contents of the configuration files of
external packages (sextractor, swarp, LDAC)

The key concept in processing data with this datamodel is the notion of ‘make’. All objects in the hierarchy that are marked with an asterisk (*) have a make() method. If the required dependencies of these objects have been filled in, then the object is made by calling make(). For example:

>>> from astro.main BiasFrame import BiasFrame
>>> from astro.main.RawFrame import RawBiasFrame
>>> bias = BiasFrame(pathname='bias.fits')
>>> bias.raw_bias_frames = [RawBiasFrame(pathname='raw_bias1.fits'),
...                         RawBiasFrame(pathname='raw_bias2.fits'),
...                         RawBiasFrame(pathname='raw_bias3.fits')]
>>> bias.make()

will make a new bias object by averaging three raw bias frames, and writing the result to a FITS file named ‘bias.fits’. We can use this object in subsequent processing, for example:

>>> from astro.main.DomeFlatFrame import DomeFlatFrame
>>> from astro.main.RawFrame import RawDomeFlatFrame
>>> dome = DomeFlatFrame(pathname='dome.fits')
>>> dome.bias = bias                       # computed before
>>> dome.raw_domeflat_frames = [RawDomeFlatFrame(pathname='raw_dome1.fits'),
...                             RawDomeFlatFrame(pathname='raw_dome2.fits'),
...                             RawDomeFlatFrame(pathname='raw_dome3.fits')]
>>> dome.make()

Note how this new object tracks its relationship with the objects it depends on. Hence, we know which bias this domeflat used:

>>> print dome.bias.pathname
bias.fits

And we also know which raw biases the bias used that this dome flat used

>>> for frame in dome.bias.raw_bias_frames
...     print frame.pathname

raw_bias1.fits raw_bias2.fits raw_bias3.fits

The dependency hierarchy for a coadded regridded frame (omitting some classes for clarity) looks like:

CoaddedRegriddedFrame | | | +–RegriddedFrame | | | +–AstrometricParameters | | | | | +–GAstrometric | | +–ReducedScienceFrame | | | +–PhotometricParameters | +–ReducedScienceFrame | | | | | +–BiasFrame | | | | | | | +–RawBiasFrame | | | | | +–MasterFlatFrame | | | | | | | +–ColdPixelMap | | | | | | | | | +–DomeFlatFrame | | | | | | | | | | | +–<BiasFrame> | | | | | +–<ColdPixelMap> | | | | | +–HotPixelMap | | | | | | | | | | | | | +–<BiasFrame> | | | | | | | | | | | +–RawDomeFlatFrame | | | | | | | +–<DomeFlatFrame> | | | +–<HotPixelMap> | | | +–NightSkyFlatFrame | | | | +–<BiasFrame> | | | | +–<ColdPixelMap> | | | | +–<HotPixelMap> | | | | +–<MasterFlatFrame> | | | | +–RawScienceFrame | | | | | | | +–TwilightFlatFrame | | | | | | | | | +–<BiasFrame> | | | | +–<ColdPixelMap> | | | | +–<HotPixelMap> | | | | +–RawTwilightFlatFrame | | | | | +–FringeFrame | | | +–<BiasFrame> | | | +–<ColdPixelMap> | | | +–<HotPixelMap> | | | +–<MasterFlatFrame> | | | +–RawScienceFrame | | | | | +–IlluminationCorrectionFrame | | +–RawScienceFrame | | | +–WeightFrame | | | | | +–<ColdPixelMap> | | +–CosmicMap | | | +–<ColdPixelMap> | | | +–<HotPixelMap> | | | +–IlluminationCorrectionFrame | | | +–<MasterFlatFrame> | | | +–<ReducedScienceFrame> | | | +–SaturatedPixelMap | | | | | | | | | +–RawFrame | | | | | +–<HotPixelMap> | | +–IlluminationCorrectionFrame | | +–<MasterFlatFrame> | | +–SatelliteMap | | | | | | | +–<ColdPixelMap> | | | +–<HotPixelMap> | | | +–IlluminationCorrectionFrame | | | +–<MasterFlatFrame> | | | +–<ReducedScienceFrame> | | | +–<SaturatedPixelMap> | | | | | +–<SaturatedPixelMap>

(Objects between <> have been expanded earlier in the tree)

This hierarchy gives a top down view of the processing that needs to be done to produce a CoaddedRegriddedFrame. To produce such an image, one must first produce PhotometricParameters (i.e. photometry), AstrometricParameters (i.e. astrometry), ReducedScienceFrames (de-biased, flat-fielded science images) and the WeightFrame associated with the ReducedScienceFrame. ReducedScienceFrames are made from RawScienceFrames, a BiasFrame, MasterFlatFrame and, depending on filter, FringeFrame. MasterFlatFrame combines DomeFlatFrame, NightSkyFlatFrame and TwilightFlatFrame. DomeFlatFrame is made from RawDomeFlatFrames etc, etc, etc.