Package gavo :: Package protocols :: Module datalink :: Class FITSProductDescriptor
[frames] | no frames]

Class FITSProductDescriptor

source code

       object --+    
                |    
ProductDescriptor --+
                    |
                   FITSProductDescriptor
Known Subclasses:

A SODA descriptor for FITS files.

On top of the normal product descriptor, this has an attribute hdr containing a copy of the image header, and a method changingAxis (see there).

There's also an attribute dataIsPristine that must be set to false if changes have been made. The formatter will spit out the original data otherwise, ignoring your changes.

Finally, there's a slices attribute provided explained in soda#fits_doWCSCutout that can be used by data functions running before it to do cutouts.

The FITSProductDescriptor is constructed like a normal ProductDescriptor.

Instance Methods
 
__init__(self, *args, **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
changingAxis(self, axisIndex, parName)
must be called before cutting out along axisIndex.
source code

Inherited from ProductDescriptor: estimateSize, makeLink, makeLinkFromFile

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods

Inherited from ProductDescriptor: fromAccref

Class Variables

Inherited from ProductDescriptor: data

Properties

Inherited from object: __class__

Method Details

__init__(self, *args, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

changingAxis(self, axisIndex, parName)

source code 

must be called before cutting out along axisIndex.

axIndex is a FITS (1-based) axis index axIndex, parName the name of the parameter that causes the cutout.

This will simply return if nobody has called changingAxis with that index before and raise a ValidationError otherwise. Data functions doing a cutout must call this before doing so; if they don't the cutout will probably be wrong when two conflicting constraints are given.