astro.main.GalPhotModel (version @(#)$Revision: 1.85 $)
index
/astro-wise/AWEHOME/AWBASE/astro/main/GalPhotModel.py

 
Modules
       
numpy
common.database.Sequence
astro.util.darma
datetime
eclipse
math
os
pyfits
common.math.statistics

 
Classes
       
astro.main.BaseFrame.BaseFrame(common.database.DataObject.DataObject, astro.main.ProcessTarget.ProcessTarget)
GalPhotModel(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
GalPhotResidual(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
GalPhotRegion
GalPhotSource
astro.main.ProcessTarget.ProcessTarget(common.database.DBMeta.DBMixin, astro.main.OnTheFly.OnTheFly)
GalPhotEllipse(common.database.DBMain.DBObject, astro.main.SourceLink.SourceLink, astro.main.ProcessTarget.ProcessTarget)
astro.main.SourceLink.SourceLink(common.database.DBMeta.DBMixin)
GalPhotEllipse(common.database.DBMain.DBObject, astro.main.SourceLink.SourceLink, astro.main.ProcessTarget.ProcessTarget)
GalPhotModel(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
GalPhotResidual(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
common.database.DBMain.DBObject(__builtin__.object)
GalPhotEllipse(common.database.DBMain.DBObject, astro.main.SourceLink.SourceLink, astro.main.ProcessTarget.ProcessTarget)
GalPhotList
GalPhotMask
GalPhotCircle
GalPhotRectangle
GalPhotParameters
common.log.Error.Error(exceptions.Exception)
GalPhotError

 
class GalPhotCircle(GalPhotMask)
    See GalPhotMask.
 
 
Method resolution order:
GalPhotCircle
GalPhotMask
common.database.DBMain.DBObject
__builtin__.object

Data descriptors defined here:
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
r
Radius of circle [pixel]
x
X position of center of circle [pixel]
y
Y position of center of circle [pixel]

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
commit(self)
Commits object including objects that are referenced and have been changed.
 
If this object refers to other persistent object a commit() ensures that
 
1. ALL changes to the object and referred objects are made persistent.
2. NONE of the changed object and referred objects are made persistent.
Under normal circumstances only the first thing should ever happen.
If the second case occurs it is almost certainly because of some bug in
the routine that implements the DBProxy interface.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

 
class GalPhotEllipse(common.database.DBMain.DBObject, astro.main.SourceLink.SourceLink, astro.main.ProcessTarget.ProcessTarget)
    This describes one ellipse as calculated by GalPhot. A GalPhotModel
consists of a number of GalPhotEllipses
 
 
Method resolution order:
GalPhotEllipse
common.database.DBMain.DBObject
astro.main.SourceLink.SourceLink
astro.main.ProcessTarget.ProcessTarget
common.database.DBMeta.DBMixin
__builtin__.object
astro.main.OnTheFly.OnTheFly

Methods defined here:
get_ellipse_parameters(self)
show_ellipse_parameters(self)

Data descriptors defined here:
GPID
Galphot ID [None]
GPLID
Galphot List identifier [None]
SID
Source identifier [None]
SLID
SourceList identifier [None]
c1
The cos(n*theta) term of the residuals along the ellipse [None]
c2
The cos(n*theta) term of the residuals along the ellipse [None]
c3
The cos(n*theta) term of the residuals along the ellipse [None]
c4
The cos(n*theta) term of the residuals along the ellipse [None]
c5
The cos(n*theta) term of the residuals along the ellipse [None]
c6
The cos(n*theta) term of the residuals along the ellipse [None]
creation_date
Date this object was created [None]
dc1
Error in c1 [None]
dc2
Error in c2 [None]
dc3
Error in c3 [None]
dc4
Error in c4 [None]
dc5
Error in c5 [None]
dc6
Error in c6 [None]
deps
Error in eps [None]
di
Error in i [ADU]
dpos
Error in pos [None]
dr
Error in r [pixel]
ds
Error in s [counts/pixel]
ds1
Error in s1 [None]
ds2
Error in s2 [None]
ds3
Error in s3 [None]
ds4
Error in s4 [None]
ds5
Error in s5 [None]
ds6
Error in s6 [None]
dx
Error in x [pixel]
dy
Error in y [pixel]
eps
The ellipticity of the ellipse, 1-b/a [None]
f1
Flag? [None]
f2
Flag? [None]
f3
Flag? [None]
f4
Flag? [None]
i
Intensity at the ellipse [counts/pixel**2]
is_valid
Manual/external flag to disqualify bad data (SuperFlag) [None]
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
pos
The position angle of the ellipse, measured with respect to the axis y=0, counter clockwise [None]
process_status
A flag indicating the processing status [None]
quality_flags
Automatic/internal quality flag [None]
r
The root of the product of the major & minor axis of the ellipse [pixel]
s
The slope of the intensity, the derivative of i wrt r [counts/pixel]
s1
The sin(n*theta) term of the residuals along the ellipse [None]
s2
The sin(n*theta) term of the residuals along the ellipse [None]
s3
The sin(n*theta) term of the residuals along the ellipse [None]
s4
The sin(n*theta) term of the residuals along the ellipse [None]
s5
The sin(n*theta) term of the residuals along the ellipse [None]
s6
The sin(n*theta) term of the residuals along the ellipse [None]
x
Central x position in the region [pixel]
x_orig
Central x position in the original image [pixel]
y
Central y position in the region [pixel]
y_orig
Central y position in the original image [pixel]

Data and other attributes defined here:
ORDER_IN_OUTPUT_FILE = ['r', 'dr', 'i', 'di', 's', 'ds', 'x', 'dx', 'y', 'dy', 'eps', 'deps', 'pos', 'dpos', 'f1', 'f2', 'f3', 'f4', 'c1', 'dc1', ...]

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
commit(self)
Commits object including objects that are referenced and have been changed.
 
If this object refers to other persistent object a commit() ensures that
 
1. ALL changes to the object and referred objects are made persistent.
2. NONE of the changed object and referred objects are made persistent.
Under normal circumstances only the first thing should ever happen.
If the second case occurs it is almost certainly because of some bug in
the routine that implements the DBProxy interface.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

Methods inherited from astro.main.ProcessTarget.ProcessTarget:
check_mandatory_dependencies(self)
check if all the mandatory dependencies are set
check_observing_blocks(self, childs)
check if all childs have the same observing_block
check_templates(self, childs)
check if all childs have the same template
compare(self)
Quality Control -- basic trend analysis
 
The compare() method is used for default trend analysis. This
is done by comparing with a previous version of the same
object (last weeks bias, for example). This may be as simple
as comparing attribute values, but may also involve more
complex computations (e.g., subtracting the two images, and
analysing the residuals)
derive_timestamp(self)
Set the creation_date attribute
get_dependencies(self)
Return a list of names of attributes that are required for make()
get_qcflags_set(self)
Return a list of names of flags that have been set.
get_qcflags_set_dict(self)
Return a dictionary of flags that have been set.  The key is the
name, the value is a tuple of (index, docstring).
inspect(self)
Quality Control -- visual inspection
 
Visual inspection of the data remains a powerful tool in
quality control. The inspect() method provides the mechanism
to record the results of visual inspection for posterity.
is_compared(self)
Return true if the object has been compared
is_inspected(self)
Return true if the object has been inspected
is_made(self)
Return true if the object has been made
is_ok(self)
Return true if no quality control flags have been set.
is_verified(self)
Return true if the object has been verified
make(self)
Construct this object from the provided data.
 
The make method is expected to produce all data and compute
all values associated with this object (i.e.: reduce the
data). It is assumed that the object will have a number of
dependencies which have to be satisfied. A dependency is
assumed to be satisfied if the dependency is not None. In the
case that the dependency is itself a ProcessTarget, the
dependency should be made.
 
Use the method get_dependencies() to get a list of attributes
on whose values this target depends.
set_compared(self)
Set the process status to indicate that the object has been
compared.
set_inspected(self)
Set the process status to indicate that the object has been
inspected.
set_made(self)
Set the process tatus to indicate that the object has been made
set_process_parameters_from_dict(self, pars={})
pars is a dictionary of the type e.g.:
{'BiasFrame.process_params.SIGMA_CLIP':8}
set_user_config(self, user_config_dict)
Store the user specified configuration (as produced e.g. by the
util.Pars tool) in a transient attribute.
set_verified(self)
Set the process status to indicate that the object has been
verified.
verify(self)
Quality Control -- internal consistency
 
This method inspects the values of various attributes of the
object to see if these are within the expected range for that
object. The purpose of this method is mostly to perform
sanity-checks on measured results. It is assumed that the
required measurements (for example image statistics) are done
during data reduction (i.e. while executing make()), and stored
in persistent attributes.

Class methods inherited from astro.main.ProcessTarget.ProcessTarget:
get_qcflags(cls) from common.database.DBMeta.DBObjectMeta
Return a list of attribute names of QCflag() objects.
is_cal(cls) from common.database.DBMeta.DBObjectMeta
Test for being cal, derived raw classes should set _IS_CAL to 1
is_config(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_CONFIG
to 1
is_raw(cls) from common.database.DBMeta.DBObjectMeta
Test for being raw, derived raw classes should set _IS_RAW to 1
is_science(cls) from common.database.DBMeta.DBObjectMeta
Test for being science, derived raw classes should set _IS_SCIENCE
to 1
is_seq(cls) from common.database.DBMeta.DBObjectMeta
Test for being seq, derived raw classes should set _IS_SEQ to 1
is_support(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_SUPPORT
to 1
select(cls, **searchterms) from common.database.DBMeta.DBObjectMeta
Class method to select RawFrames, Calfiles and ReducedScienceFrames
from the database.
 
Syntax example:
 
q = RawScienceFrame.select(instrument='WFI', filter='#842',
    chip='ccd50', time_from='2000-01-02 04:45:46',
    time_to='2000-01-02 05:03:00')
 
Possible search terms:
----------------------
check_quality  - (Default 1) Exclude invalidated data (quality_flags!=0)
check_validity - (Default 1) Exclude invalidated data (is_valid=0)
chip        - select of the same CCD ('ccd50', 'ccd51', etc.)
date        - select of the same date (i.e. date at the start of
              observing night, in yyyy-mm-dd format)
exptime     - select frames with similar exposure time
              (EXPTIME-0.8sec to EXPTIME+0.8 sec)
extension   - select (raw) frames for a certain extension of its
              RawFitsData object
filename    - select a frame(!) by its filename
filter      - select of the same filter ('#842', '#843', etc.)
instrument  - select of the same instrument ('WFI', 'WFC', 'OCAM')
object      - select for OBJECT header keyword, uses "like"
              functionality, which allows wildcards "*" and "?"
time_from   - precise form of date, in yyyy-mm-dd hh:mm:ss format
time_to     - required when using time_from
select_for_raw(cls, raw, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Class method to select the most recent valid calfile for the
provided raw frame from the database.
select_for_reduced(cls, reduced, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Synonym for the select_for_raw method; the implementation should
be identical.

Data and other attributes inherited from astro.main.ProcessTarget.ProcessTarget:
PROCESS_TIME = 0
STATUS_COMPARE = 2
STATUS_INSPECT = 3
STATUS_MAKE = 0
STATUS_VERIFY = 1
mandatory_dependencies = ()

Class methods inherited from common.database.DBMeta.DBMixin:
get_persistent_attributes(cls) from common.database.DBMeta.DBObjectMeta
return a list of persistent attributes

Methods inherited from astro.main.OnTheFly.OnTheFly:
Flagged(self)
Check if any flag is set
return 1 for flag is set
return 0 no flag
after_do_make(self, switches=None)
extra make statements, this method can be overridden by OnTheFly classes to
implement extra make statements which will be executed after the make of self
after_set_onthefly_dependencies(self, switches, advanced)
this method is called after the onthefly method set_onthefly_dependencies
derived classes can implement this method to customize the dependencies
setting after this has been done automatically by onthefly
after_uptodate_object(self, dependencies_missing, dependencies_new, dependencies_obsolete)
The uptodate_object method determines if the object is uptodate, and will result in three listings :
 dependencies_missing - missing mandatory dependencies
 dependencies_new - new dependencies
 dependencies_obsolete - current dependencies that are obsolete
Derived classes can override this method to tweak the listings
check_for_mandatory(self, dep_str, dep_new)
check if dependency is mandatory and present
dep_str is the name of the attribute, dep_new is the (attribute) object
get_onthefly_dependencies(self, advanced=None)
Method retrieves a list of all dependencies used for
on-the-fly processing
Return: [dependency, dependency class, dependency name]
uptodate(self, date_time=None, template=None, switches=None, advanced=None)
This method checks if the object is up-to-date, for the given datetime.
OnTheFly_uptodate class has the functionality for checking uptodate

Class methods inherited from astro.main.OnTheFly.OnTheFly:
exist(cls, date_time=None, chip=None, filter=None, object_id=None, parent=None, parent_attr=None, template=None, extra=[], advanced=None, switches=None) from common.database.DBMeta.DBObjectMeta
for the given parameters and class return the most
recent object(s), or None
get_onthefly(cls, date_time=None, filter=None, chip=None, object_id=None, advanced=None, switches=None, template=None, parent=None, parent_attr=None) from common.database.DBMeta.DBObjectMeta
For the given parameters and class get the object,
if the object does not exist -> make it.
This is done recursively for all dependencies.
 
The object can only be made if there are raws

 
class GalPhotError(common.log.Error.Error)
    
Method resolution order:
GalPhotError
common.log.Error.Error
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods inherited from common.log.Error.Error:
__init__(self, message)
__str__(self)

Data descriptors inherited from common.log.Error.Error:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x719220>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
class GalPhotList(common.database.DBMain.DBObject)
    The goal of this class is to connect GalPhotModels together, in
particular those that have been derived in a single "run". A GalPhotList
is derived for a particular SourceList.
 
 
Method resolution order:
GalPhotList
common.database.DBMain.DBObject
__builtin__.object

Methods defined here:
commit(self)
make(self)
set_creation_date(self)
set_unique_identifier(self)
The GPLID identifier is used to identify the GalPhotModels that
have been derived in a single run and for a single SourceList

Data descriptors defined here:
GPLID
Galphot List identifier [None]
SLID
SourceList identifier [None]
creation_date
Date this object was created [None]
is_valid
Manual/external flag to disqualify bad data (SuperFlag) [None]
name
Any string specified by user [None]
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
quality_flags
Automatic/internal quality flag [None]

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

 
class GalPhotMask(common.database.DBMain.DBObject)
    GalPhotMask objects are circles (GalPhotCircle) and rectangles
(GalPhotRectangle) that can be specified in the "deletion" file used by
Galphot. These areas are masked/ignored in the fit.
 
 
Method resolution order:
GalPhotMask
common.database.DBMain.DBObject
__builtin__.object

Data descriptors defined here:
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
commit(self)
Commits object including objects that are referenced and have been changed.
 
If this object refers to other persistent object a commit() ensures that
 
1. ALL changes to the object and referred objects are made persistent.
2. NONE of the changed object and referred objects are made persistent.
Under normal circumstances only the first thing should ever happen.
If the second case occurs it is almost certainly because of some bug in
the routine that implements the DBProxy interface.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

 
class GalPhotModel(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
    This is a complete galphot model of a galaxy. It consists of a number
of GalPhotEllipses
 
 
Method resolution order:
GalPhotModel
astro.main.BaseFrame.BaseFrame
common.database.DataObject.DataObject
common.database.DBMain.DBObject
astro.main.ProcessTarget.ProcessTarget
astro.main.SourceLink.SourceLink
common.database.DBMeta.DBMixin
__builtin__.object
astro.main.OnTheFly.OnTheFly

Methods defined here:
__init__(self, pathname='')
calculate_D25_26_27(self)
Calculate the major axis diameter at 25, 26 and 27 mag/arcsec^2
calculate_central_surface_brightness(self)
Calculate average central surface brightness for circular aperture-
diameters of 3, 5 and 10 arcsec. Pixels are subdivided in 4 to
determine the part of the flux within the circular aperture.
calculate_global_parameters(self)
This method calculates global parameters derived from the collection
of ellipses that consitute the GalPhotModel. Possible parameters of
interest include effective radius, Sersic concentration index N,
median position angle, median ellipticity etc.
calculate_sersic_parameters(self)
Perform a fit to the ellipses generated by Galphot, to fit a Sersic
profile.
check_preconditions(self)
clean_up(self)
commit(self)
copy_astrometry_from_original_frame(self)
Keep the astrometry of the original frame and place it in the header
of the image created by Galphot. The CRPIX1, CRPIX2 values are updated
because the ones from the entire frame (of which we use the astrometry)
do not match the cutout.
copy_attributes_to_ellipses(self)
derive_region_location(self)
free_memory(self)
get_canonical_name(self)
Generate the unique filename for this GalPhotModel.
get_fixed_config(self)
Return the configuration parameters that are fixed by the class,
i.e. overridden in the make method.
get_mask(self)
get_model(self)
Download the model image
get_model_parameters(self)
Returns a list of dictionaries (one dictionary for each model
component) which contain the model parameters of the model.
get_residual(self)
Get the residual image, which is the science image minus the model
 
This is essentially get_science() - get_model()
get_science(self)
Get the image region from the science image
get_weight(self)
Get the image region from the weight image
make(self)
make_input_mask_file(self)
make_regions(self)
make_residual_from_source_frame(self)
Subtract the model image from the frame from which the SourceList
was derived, create and return a Modified[...]Frame.
make_residual_image(self)
make_science_region(self)
Create and set the transient Regions from the frame associated with
the sourcelist and its weight image.
make_segmentation_region(self)
make_weight_region(self)
Create and set the transient Regions from the frame associated with
the sourcelist and its weight image.
mask_areas_from_neighbours(self)
Append GalPhotCircle objects to areas to be masked, based on
sources found close to the primary source in the SourceList.
mask_areas_from_segmentation_image(self)
Use the Sextractor segmentation image stored alongside SourceLists
to find pixels attributed to sources other than the primary object,
and mask those pixels.
mask_areas_from_weight(self)
Append GalPhotRectangle objects to areas to be masked, for pixels
that have weight 0.
read_mask_file(self)
The mask file is a text file containing either 3 or 4 numbers per
line, describing circles or rectangles respectively. The file read in
here should be in units of the pixel positions of the original frame.
rename_galphot_output(self)
run_galphot(self)
System call to galphot
set_creation_date(self)
set_fixed_process_parameters(self)
set_intable_file(self)
set_mask(self)
set_mask_areas(self)
The following areas are masked:
 
1) (Always) the positions where the weight map is equal to zero
2) (from SExtractor segmentation image)
   if process_params.mask_type == 'segmentation':
     rectangles for pixels attributed to sources other than the
     primary object
3) (from SourceList)
   if process_params.mask_type == 'sourcelist':
     circles of radius mask_scale*A for objects neighbouring the
     primary object
4) Any GalPhotRectangle/GalPhotCircle objects already found in the
   mask_areas attribute
5) Any rectangles or circles described in a standard Galphot deletion
   file, the filename of which is specified by the user in "mask_file".
set_mask_check_file(self)
set_model_parameters(self)
Read the output file of Galphot, and set the appropriate parameters
of the GalPhotModel class. I.e. instantiate one GalPhotEllipse
object per line in the output file, and set the object's ellipse
parameters accordingly.
set_process_parameters_from_dict(self, pars={})
pars is a dictionary of the type e.g.:
{'GalPhotModel.process_params.npolres' : 6}
set_profile_file(self)
set_source(self)
Create and set the transient Source attribute based on
self.sourcelist and self.SID, the source identifier in the sourcelist.
set_sourcelist(self)
Query the database for the SLID and set the (transient) sourcelist
attribute.
set_unique_identifiers(self)
The GPID identifier is used to identify the GalPhotEllipse objects
that belong to a GalPhotModel object; they will all have the same GPID
as the GalPhotModel.
set_xpos_ypos(self)
show_model_parameters(self)
Print all parameters for all components in this GalPhotModel.
transform_region_to_frame(self, x, y)
use_gpid_in(self)
When the attribute "GPID_in" of a GalPhotModel is specified,
it will be used as an "intable". In other words: the GalPhotModel
identified by GPID_in is used as an initial estimate of the
parameters.
use_other_as_initial_guess(self, other)
Use another GalPhotModel as an initial guess for the present
GalPhotModel. This is the equivalent of using "intable" in Galphot.
Hence the argument "other" is another GalPhotModel object.
write_as_table(self, filename='')
Write the GalPhotModel in the form of a (simple ASCII) table.
write_input_mask_file(self)
Write the objects to be masked to the mask file ("deletion file").
 
Galphot can read up to three ascii files which contain bad pixel
positions. The files must have filenames equal to the science image
but with extensions .star, .cosmic, or .del. The files contain
descriptions of squares or circles, 4 numbers per line (corners) for
the former, and 3 position and radius for the latter. Here only the
.del file is written, combining all areas to be masked.

Data descriptors defined here:
D25
Diameter at which surface brightness is 25mag/arcsec^2 [arcsec]
D26
Diameter at which surface brightness is 26mag/arcsec^2 [arcsec]
D27
Diameter at which surface brightness is 27mag/arcsec^2 [arcsec]
GPID
Galphot ID [None]
GPID_in
Identifier of GalPhotModel to be used as initial estimate (i.e. the "intable") [None]
GPLID
Galphot List identifier [None]
NAXIS1
Length of data in axis 1 [pixel]
NAXIS2
Length of data in axis 2 [pixel]
SID
Source identifier [None]
SLID
SourceList identifier [None]
creation_date
Date this object was created [None]
dD25
Error in D25 [arcsec]
dD26
Error in D26 [arcsec]
dD27
Error in D27 [arcsec]
dmu10
Error in mu10 [mag / arcsec**2]
dmu3
Error in mu3 [mag / arcsec**2]
dmu5
Error in mu5 [mag / arcsec**2]
ellipses
List of ellipses [None]
eps
Global ellipticity (median of ellipses) [None]
filename
The name of the associated file [None]
globalname
The name used to store and retrieve file to and from Storage [None]
imstat
Image statistics for the frame [None]
is_valid
Manual/external flag to disqualify bad data (SuperFlag) [None]
mask
Final mask used (and written as output) by Galphot
mu10
Average central surface brightness within 10 arcsec diameter [mag / arcsec**2]
mu3
Average central surface brightness within 3 arcsec diameter [mag / arcsec**2]
mu5
Average central surface brightness within 5 arcsec diameter [mag / arcsec**2]
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
pos
Global position angle (median of ellipses) [None]
process_params
Processing parameters [None]
process_status
A flag indicating the processing status [None]
quality_flags
Automatic/internal quality flag [None]
sersic_N
Concentration index N of Sersic profile fitted to the ellipses [None]
sersic_dN
Error in sersic_N [None]
sersic_dmu
Error in sersic_mu [mag / arcsec**2]
sersic_dre
Error in sersic_re [arcsec]
sersic_mu
Surface brightness at the effective radius of Sersic profile fitted to the ellipses [mag / arcsec**2]
sersic_re
Effective radius of Sersic profile fitted to the ellipses [arcsec]

Data and other attributes defined here:
PROCESS_TIME = 20

Methods inherited from astro.main.BaseFrame.BaseFrame:
build_header(self)
Fill a default header with values from descriptors
commit_subwinstat(self)
Conditionally commit subwindow statistics
display(self, viewer='skycat', filename=None)
Independent display method for all frames.
empty_header(self)
Initalize to a default (empty) header
estimate_statistics(self, pixmap=None, zone=None, max_iter=5, threshold=5.0)
Estimate the mean, median and stddev, by iteratively excluding
pixelvalues deviating too far from the median
 
Arguments:
   pixmap     -- optional map for bad pixels (default=None)
   zone       -- optional region (x0, y0, x1, y1) (default=None)
   max_iter   -- The maximum number of iterations
   sig_thresh -- The threshold in number of standard deviations
get_previous_version(self, level=0)
Return previous version of this object.  If it does not exist,
return None.
 
  level: depth of query for previous version (0 goes as deep as
         possible)
initialize_astrom_attribute(self)
initialize_chip_attribute(self)
initialize_filter_attribute(self)
initialize_imstat_attribute(self)
initialize_instrument_attribute(self)
initialize_lamp_attribute(self)
initialize_observingblock_attribute(self)
initialize_template_attribute(self)
inspect(self, pixels=None, zone=None, kappa=3.0, iterations=2, cmap=None, vmin=None, vmax=None, interpolation='lanczos', width=6, ratio=None, viewer='skycat', force_figure=False, force_viewer=False, subplot_size=50, contour_levels=20, num_bins=100, extension=None, compare=False, level=0, other=None, clip=False, color=False)
Optional visual inspection for quality control displays image in a
PyLab (MatPlotLib) window or optionally in an external viewer.
 
        pixels: optional list or array representing the image to be
                inspected (can be MxN for greyscale, or MxNx3 for RGB)
          zone: tuple of (x0, y0, x1, y1) representing the image
                coordinates of the two oposing corners of the sub
                image to consider
         kappa: the factor by which the dynamic range is increased in
                units of sigma (0 gives full range)
    iterations: number of iterations in the kappa-sigma range clipping
          cmap: PyLab color map instance
          vmin: lower display range in native units (e.g. ADU)
          vmax: upper display range in native units (e.g. ADU)
 interpolation: type of interpolation the PyLab viewer uses (nearest,
                bilinear, etc.)
         width: width of the PyLab figure window (in inches)
         ratio: ratio by which to scale the figure height (default:
                x_dim/y_dim)
        viewer: external viewer to use in case the image is too large
  force_figure: always use the PyLab figure window (Be Careful!
                Statistics calculations on large images can be very
                time and memory consuming.)
  force_viewer: always use the viewer
  subplot_size: width and height in pixels of region of interest
contour_levels: number of contour levels for the contour plot of the
                region of interest
      num_bins: number of bins in the histogram plot
     extension: extension of the filetype to save plot to (png, ps,
                or eps) None disables saving
       compare: compare this frame to its previous version using
                difference imaging (current-previous), pixels is
                ignored
         level: depth of query for previous version (0 goes as deep
                as possible) when compare is True
         other: a second of the same type of Frame object to replace
                previous when compare is True (if color is True,
                other can be a list of two images)
          clip: kappa-sigma clip each image prior to subtraction when
                compare is True
         color: use color combining (RGB) instead of differencing
                when compare is True (kappa, vmin/vmax only honored
                when clip is True), this image is R, other is B if
                single, other is [G, B] if it is a list
                (EXPERIMENTAL)
 
When force_viewer is False, inspect() displays basic image
statistics (mean, stddev) and then a representation of the image
that can be zoomed and panned.  Pressing various keys will give
different results described below in a region of interest described
by subplot_size:
 
      q - closes the most recent plot window when pressed in the
          main window
[space] - displays the X and Y coordinate (FITS standard unit
          indexed) and the count level
      a - performs aperture photometry on brightest feature in the
          region of interest (NOT YET IMPLEMENTED)
      c - displays a contour plot of the region of interest (see
          contour_levels)
      h - displays a histogram of the pixel values of the region of
          interest (see num_bins)
      r - displays a radial plot of the brightest feature in the
          region of interest
      s - displays a surface plot of the region of interest
      p - displays profile plots in both X and Y dimensions versus
          intensity (count level)
 
NOTE: None of the commands above work in the subplots.
is_compressed(self)
Find out if a FITS file is compressed
load_header(self)
Initialize self.header
load_image(self, readonly=0)
Initialize self.image.
make_background(self)
Make a background image,
 
Returns a new BaseFrame object. The name of the new file is
"name.back.fits"
make_subwinstat(self)
Compute statistics on subwindows
read_header(self)
Read a header into descriptors.
 
The descriptor is assumed to include a number of all caps
attributes that map directly to FITS header keywords. In
addition, if any of the following attributes are present, this
routine will initialize those attributes.
 
Initialized attributes: instrument, chip, filter, lamp, imstat,
astrom, observing_block, template
retrieve(self)
Retrieve this frame from the data server and uncompress it if it has
been compressed with FITSIO.
save(self, filename='', overwrite=1)
statistics(self, pixmap=None, zone=None)
Compute statistics and store in self.imstat.
 
Arguments:
   pixmap -- optional pixelmap object         (default=None)
   zone   -- optional region (x0, y0, x1, y1) (default=None)
update_header(self)
Update a header with values from descriptors
update_history(self)
Update a header with history
 
History is maintained in the instance attribute
history. History is written by appending string to the history
list.

Methods inherited from common.database.DataObject.DataObject:
FileName(self)
Return the pathame of the object
Name(self)
Return the name of the object
check_mandatory_dependencies(self)
check if all the mandatory dependencies are set
derive_hash(self)
Apply hashing function to the contents of the file that is part of
this object.
 
The SHA hashing function is used to calculate a hash value of the
contents of this DataObject. The hash value is returned as a
hexadecimal string.
distinct(self, param_list)
This method returns the distinct values from an input list. The
current implementation is kinda cheesy.
exists(self)
Test is the file existsts
get_pathname(self)
Getter for pathname
is_on_dataserver(self)
Checks if file is accessable on the dataserver.
 
NOTE: A return of False does NOT imply the file is not on any
      dataserver!  It is simply not on any accessable
      dataserver.
is_stored(self)
locate(self)
See common/net/dataserver_client.py (Data_IO.locate).
 
Returns a list of strings describing all dataservers where the file is
located as well as a few properties of the file, i.e.
 ['ip=...,port=...,path=...,size=...,mdate=...,
  'ip=...,port=...,path=?,size=?,mdate=?']
 
Question marks indicate that this dataserver is not reachable.
name_insert_suffix(self, suffix)
name_replace_suffix(self, suffix)
name_with_new_suffix(self, suffix)
release(self)
set_filename(self, pathname=None, processlevel='')
Specify a filename for this DataObject or use the default filename.
 
This method is used to set the filename attribute of a DataObject.
If called without a filename, the filename is set to the canonical name.
Classes that are derived from DataObject are expected to define a
method get_canonical_name() that returns the name for an instance
of that class. This is mandatory for CalFiles (or files that are
store()d on the data server) and optional for other files.
set_pathname(self, pathname)
Setter for pathname
set_stored(self)
set_user_config(self, pars={})
store(self)
store_with_hash_as_name(self, prefix='', suffix='fits')
Name the file after the hash value of the file and store it.
 
First the hash value of the file is calculated. The pathname of the
dataobject is renamed to the hash value with the given suffix appended.
Then the file is stored.

Class methods inherited from common.database.DataObject.DataObject:
is_cal(cls) from common.database.DBMeta.DBObjectMeta
Test for being cal, derived raw classes should set _IS_CAL to 1
is_config(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_CONFIG to 1
is_raw(cls) from common.database.DBMeta.DBObjectMeta
Test for being raw, derived raw classes should set _IS_RAW to 1
is_science(cls) from common.database.DBMeta.DBObjectMeta
Test for being science, derived raw classes should set _IS_SCIENCE to 1
is_seq(cls) from common.database.DBMeta.DBObjectMeta
Test for being seq, derived raw classes should set _IS_SEQ to 1
is_support(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_SUPPORT to 1

Data descriptors inherited from common.database.DataObject.DataObject:
pathname

Data and other attributes inherited from common.database.DataObject.DataObject:
filepath = './'
localname = ''
mandatory_dependencies = ()
storage = <common.net.dataserver_client.Storage at 0x13e1560>

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

Methods inherited from astro.main.ProcessTarget.ProcessTarget:
check_observing_blocks(self, childs)
check if all childs have the same observing_block
check_templates(self, childs)
check if all childs have the same template
compare(self)
Quality Control -- basic trend analysis
 
The compare() method is used for default trend analysis. This
is done by comparing with a previous version of the same
object (last weeks bias, for example). This may be as simple
as comparing attribute values, but may also involve more
complex computations (e.g., subtracting the two images, and
analysing the residuals)
derive_timestamp(self)
Set the creation_date attribute
get_dependencies(self)
Return a list of names of attributes that are required for make()
get_qcflags_set(self)
Return a list of names of flags that have been set.
get_qcflags_set_dict(self)
Return a dictionary of flags that have been set.  The key is the
name, the value is a tuple of (index, docstring).
is_compared(self)
Return true if the object has been compared
is_inspected(self)
Return true if the object has been inspected
is_made(self)
Return true if the object has been made
is_ok(self)
Return true if no quality control flags have been set.
is_verified(self)
Return true if the object has been verified
set_compared(self)
Set the process status to indicate that the object has been
compared.
set_inspected(self)
Set the process status to indicate that the object has been
inspected.
set_made(self)
Set the process tatus to indicate that the object has been made
set_verified(self)
Set the process status to indicate that the object has been
verified.
verify(self)
Quality Control -- internal consistency
 
This method inspects the values of various attributes of the
object to see if these are within the expected range for that
object. The purpose of this method is mostly to perform
sanity-checks on measured results. It is assumed that the
required measurements (for example image statistics) are done
during data reduction (i.e. while executing make()), and stored
in persistent attributes.

Class methods inherited from astro.main.ProcessTarget.ProcessTarget:
get_qcflags(cls) from common.database.DBMeta.DBObjectMeta
Return a list of attribute names of QCflag() objects.
select(cls, **searchterms) from common.database.DBMeta.DBObjectMeta
Class method to select RawFrames, Calfiles and ReducedScienceFrames
from the database.
 
Syntax example:
 
q = RawScienceFrame.select(instrument='WFI', filter='#842',
    chip='ccd50', time_from='2000-01-02 04:45:46',
    time_to='2000-01-02 05:03:00')
 
Possible search terms:
----------------------
check_quality  - (Default 1) Exclude invalidated data (quality_flags!=0)
check_validity - (Default 1) Exclude invalidated data (is_valid=0)
chip        - select of the same CCD ('ccd50', 'ccd51', etc.)
date        - select of the same date (i.e. date at the start of
              observing night, in yyyy-mm-dd format)
exptime     - select frames with similar exposure time
              (EXPTIME-0.8sec to EXPTIME+0.8 sec)
extension   - select (raw) frames for a certain extension of its
              RawFitsData object
filename    - select a frame(!) by its filename
filter      - select of the same filter ('#842', '#843', etc.)
instrument  - select of the same instrument ('WFI', 'WFC', 'OCAM')
object      - select for OBJECT header keyword, uses "like"
              functionality, which allows wildcards "*" and "?"
time_from   - precise form of date, in yyyy-mm-dd hh:mm:ss format
time_to     - required when using time_from
select_for_raw(cls, raw, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Class method to select the most recent valid calfile for the
provided raw frame from the database.
select_for_reduced(cls, reduced, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Synonym for the select_for_raw method; the implementation should
be identical.

Data and other attributes inherited from astro.main.ProcessTarget.ProcessTarget:
STATUS_COMPARE = 2
STATUS_INSPECT = 3
STATUS_MAKE = 0
STATUS_VERIFY = 1

Class methods inherited from common.database.DBMeta.DBMixin:
get_persistent_attributes(cls) from common.database.DBMeta.DBObjectMeta
return a list of persistent attributes

Methods inherited from astro.main.OnTheFly.OnTheFly:
Flagged(self)
Check if any flag is set
return 1 for flag is set
return 0 no flag
after_do_make(self, switches=None)
extra make statements, this method can be overridden by OnTheFly classes to
implement extra make statements which will be executed after the make of self
after_set_onthefly_dependencies(self, switches, advanced)
this method is called after the onthefly method set_onthefly_dependencies
derived classes can implement this method to customize the dependencies
setting after this has been done automatically by onthefly
after_uptodate_object(self, dependencies_missing, dependencies_new, dependencies_obsolete)
The uptodate_object method determines if the object is uptodate, and will result in three listings :
 dependencies_missing - missing mandatory dependencies
 dependencies_new - new dependencies
 dependencies_obsolete - current dependencies that are obsolete
Derived classes can override this method to tweak the listings
check_for_mandatory(self, dep_str, dep_new)
check if dependency is mandatory and present
dep_str is the name of the attribute, dep_new is the (attribute) object
get_onthefly_dependencies(self, advanced=None)
Method retrieves a list of all dependencies used for
on-the-fly processing
Return: [dependency, dependency class, dependency name]
uptodate(self, date_time=None, template=None, switches=None, advanced=None)
This method checks if the object is up-to-date, for the given datetime.
OnTheFly_uptodate class has the functionality for checking uptodate

Class methods inherited from astro.main.OnTheFly.OnTheFly:
exist(cls, date_time=None, chip=None, filter=None, object_id=None, parent=None, parent_attr=None, template=None, extra=[], advanced=None, switches=None) from common.database.DBMeta.DBObjectMeta
for the given parameters and class return the most
recent object(s), or None
get_onthefly(cls, date_time=None, filter=None, chip=None, object_id=None, advanced=None, switches=None, template=None, parent=None, parent_attr=None) from common.database.DBMeta.DBObjectMeta
For the given parameters and class get the object,
if the object does not exist -> make it.
This is done recursively for all dependencies.
 
The object can only be made if there are raws

 
class GalPhotParameters(common.database.DBMain.DBObject)
    Parameters used by Galphot; in the IRAF version these are the
parameters that are shown when using the "epar ellipfit" command.
 
In addition the following parameters are added:
xpos, ypos:
  the (galaxy) position normally specified in the ".pos" file
region_xmin, region_xmax, region_ymin, region_ymax:
  these determine which region of the frame from which the SourceList
  was derived is used as input for Galphot, automatically determined
  based on the position of the modelled source
region_scale:
  scale factor determining region_xmin etc.
mask_areas:
  the circles (GalPhotCircle objects) and rectangles (GalPhotRectangle
  objects) to be masked, normally found in a ".del" (deletion) file
mask_type:
  switch to use Sourcelist ("sourcelist"), Segmentation image
  ("segmentation") or neither ("") for masking neighbours
mask_scale:
  scale factor to apply to semi-major axis of neighbours while masking
 
 
Method resolution order:
GalPhotParameters
common.database.DBMain.DBObject
__builtin__.object

Methods defined here:
set_from_dict(self, dictionary)
to_config_file_as_dict(self)
write_configuration_file(self, filename='prof.par')

Data descriptors defined here:
cliphigh
Fraction of points to clip at high end [None]
cliplow
Fraction of points to clip at low end [None]
dangmax
Maximum change in position angle per iteration [None]
debug
Debug verbosity parameter [None]
dellmax
Maximum change in ellipticity per iteration [None]
dposmax
Maximum change in center per iteration [pixel]
errcen
Used when rcen=0. The maximum radius for which err(1nd har) < errcen is used as the maximum radius for changing the centers [None]
errshap
Used when rshap=0. The maximum radius for which err(2nd har) < errshap is used as the maximum radius for fitting. [None]
extend
Extend radial interval after fit [None]
fracmin
Minimum fraction of good points along the ellipse [None]
hmax
Maximum order of the harmonics term residuals [None]
iter1
Number of iterations without calculating model-residuals [None]
iter2
Number of iterations including calculating model-residuals [None]
linear
Linear scaling switch [None]
mask_areas
List of GalPhotCircle and/or GalPhotRectangle objects, which define areas to be masked [None]
mask_scale
Used when mask_type="sourcelist". Scale factor to apply to semi-major axis of neighbours while defining a GalPhotCircle mask [None]
mask_type
Switch to use Sourcelist ("sourcelist"), Segmentation image ("segmentation") or neither ("") for masking neighbours [None]
ngal
Number of galaxies to model, fixed to 1 [None]
npolres
Order in interpolation in intensity [None]
nsammax
Maximum number of samples along the ellipse [None]
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
outfill
Calculate residual outside of galaxy [None]
r1
Maximum radius for single annulus sampling [pixel]
r2
Maximum radius for multiple annulus sampling [pixel]
radfac
Radial scaling factor [None]
rcen
All ellipses with r > rcen have their centers fixed [pixel]
region_scale
Factor which determines the size of the region, as a function of the source Sextractor parameter Reff [None]
region_xmax
Maximum x-coordinate of cutout region in larger frame [pixel]
region_xmin
Minimum x-coordinate of cutout region in larger frame [pixel]
region_ymax
Maximum y-coordinate of cutout region in larger frame [pixel]
region_ymin
Minimum y-coordinate of cutout region in larger frame [pixel]
rmax
Maximum radius for fit. rmax=0 means fit until ellipses drop completely off the image [pixel]
rmin
Minimum radius for fit [pixel]
rshap
Maximum radius for modifying ellipticity and PA [pixel]
xpos
X-position (in original image) of galaxy to model [pixel]
ypos
Y-position (in original image) of galaxy to model [pixel]

Data and other attributes defined here:
TO_CONFIG_FILE = ['iter1', 'iter2', 'hmax', 'nsammax', 'debug', 'npolres', 'rmin', 'rmax', 'radfac', 'rshap', 'rcen', 'errshap', 'errcen', 'dposmax', 'dellmax', 'dangmax', 'r1', 'r2', 'fracmin', 'cliplow', ...]

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
commit(self)
Commits object including objects that are referenced and have been changed.
 
If this object refers to other persistent object a commit() ensures that
 
1. ALL changes to the object and referred objects are made persistent.
2. NONE of the changed object and referred objects are made persistent.
Under normal circumstances only the first thing should ever happen.
If the second case occurs it is almost certainly because of some bug in
the routine that implements the DBProxy interface.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

 
class GalPhotRectangle(GalPhotMask)
    See GalPhotMask.
 
 
Method resolution order:
GalPhotRectangle
GalPhotMask
common.database.DBMain.DBObject
__builtin__.object

Data descriptors defined here:
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
xmax
Maximum x value of rectangle [pixel]
xmin
Minimum x value of rectangle [pixel]
ymax
Maximum y value of rectangle [pixel]
ymin
Minimum y value of rectangle [pixel]

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
commit(self)
Commits object including objects that are referenced and have been changed.
 
If this object refers to other persistent object a commit() ensures that
 
1. ALL changes to the object and referred objects are made persistent.
2. NONE of the changed object and referred objects are made persistent.
Under normal circumstances only the first thing should ever happen.
If the second case occurs it is almost certainly because of some bug in
the routine that implements the DBProxy interface.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

 
class GalPhotRegion
    A region of a larger frame
 
  Methods defined here:
__init__(self)
check_dimensions(self)
fetch_from_dataserver(self)
get_from_imageserver(self)
make(self)
rename_region(self)
set_pixel_shifts_from_original(self)
Differences between CRPIX1, CRPIX2 of the frame and cutout:
 
x_orig = x_cutout + shift_x
y_orig = y_cutout + shift_y

 
class GalPhotResidual(astro.main.BaseFrame.BaseFrame, astro.main.SourceLink.SourceLink)
    Class used to persistently store the residual of a GalPhotModel and the
frame it was derived from.
 
 
Method resolution order:
GalPhotResidual
astro.main.BaseFrame.BaseFrame
common.database.DataObject.DataObject
common.database.DBMain.DBObject
astro.main.ProcessTarget.ProcessTarget
astro.main.SourceLink.SourceLink
common.database.DBMeta.DBMixin
__builtin__.object
astro.main.OnTheFly.OnTheFly

Methods defined here:
commit(self)
copy_attributes(self)
make(self)
set_creation_date(self)
set_filename(self)
set_model(self, model)

Data descriptors defined here:
GPID
Galphot ID [None]
GPLID
Galphot List identifier [None]
NAXIS1
Length of data in axis 1 [pixel]
NAXIS2
Length of data in axis 2 [pixel]
SID
Source identifier [None]
SLID
SourceList identifier [None]
creation_date
Date this object was created [None]
filename
The name of the associated file [None]
globalname
The name used to store and retrieve file to and from Storage [None]
imstat
Image statistics for the frame [None]
is_valid
Manual/external flag to disqualify bad data (SuperFlag) [None]
object_id
The object identifier
 
The object identifier is an attribute shared by all persistent
instances. It is the prime key, by which object identity is established
process_status
A flag indicating the processing status [None]
quality_flags
Automatic/internal quality flag [None]

Methods inherited from astro.main.BaseFrame.BaseFrame:
__init__(self, **kw)
build_header(self)
Fill a default header with values from descriptors
commit_subwinstat(self)
Conditionally commit subwindow statistics
display(self, viewer='skycat', filename=None)
Independent display method for all frames.
empty_header(self)
Initalize to a default (empty) header
estimate_statistics(self, pixmap=None, zone=None, max_iter=5, threshold=5.0)
Estimate the mean, median and stddev, by iteratively excluding
pixelvalues deviating too far from the median
 
Arguments:
   pixmap     -- optional map for bad pixels (default=None)
   zone       -- optional region (x0, y0, x1, y1) (default=None)
   max_iter   -- The maximum number of iterations
   sig_thresh -- The threshold in number of standard deviations
get_previous_version(self, level=0)
Return previous version of this object.  If it does not exist,
return None.
 
  level: depth of query for previous version (0 goes as deep as
         possible)
initialize_astrom_attribute(self)
initialize_chip_attribute(self)
initialize_filter_attribute(self)
initialize_imstat_attribute(self)
initialize_instrument_attribute(self)
initialize_lamp_attribute(self)
initialize_observingblock_attribute(self)
initialize_template_attribute(self)
inspect(self, pixels=None, zone=None, kappa=3.0, iterations=2, cmap=None, vmin=None, vmax=None, interpolation='lanczos', width=6, ratio=None, viewer='skycat', force_figure=False, force_viewer=False, subplot_size=50, contour_levels=20, num_bins=100, extension=None, compare=False, level=0, other=None, clip=False, color=False)
Optional visual inspection for quality control displays image in a
PyLab (MatPlotLib) window or optionally in an external viewer.
 
        pixels: optional list or array representing the image to be
                inspected (can be MxN for greyscale, or MxNx3 for RGB)
          zone: tuple of (x0, y0, x1, y1) representing the image
                coordinates of the two oposing corners of the sub
                image to consider
         kappa: the factor by which the dynamic range is increased in
                units of sigma (0 gives full range)
    iterations: number of iterations in the kappa-sigma range clipping
          cmap: PyLab color map instance
          vmin: lower display range in native units (e.g. ADU)
          vmax: upper display range in native units (e.g. ADU)
 interpolation: type of interpolation the PyLab viewer uses (nearest,
                bilinear, etc.)
         width: width of the PyLab figure window (in inches)
         ratio: ratio by which to scale the figure height (default:
                x_dim/y_dim)
        viewer: external viewer to use in case the image is too large
  force_figure: always use the PyLab figure window (Be Careful!
                Statistics calculations on large images can be very
                time and memory consuming.)
  force_viewer: always use the viewer
  subplot_size: width and height in pixels of region of interest
contour_levels: number of contour levels for the contour plot of the
                region of interest
      num_bins: number of bins in the histogram plot
     extension: extension of the filetype to save plot to (png, ps,
                or eps) None disables saving
       compare: compare this frame to its previous version using
                difference imaging (current-previous), pixels is
                ignored
         level: depth of query for previous version (0 goes as deep
                as possible) when compare is True
         other: a second of the same type of Frame object to replace
                previous when compare is True (if color is True,
                other can be a list of two images)
          clip: kappa-sigma clip each image prior to subtraction when
                compare is True
         color: use color combining (RGB) instead of differencing
                when compare is True (kappa, vmin/vmax only honored
                when clip is True), this image is R, other is B if
                single, other is [G, B] if it is a list
                (EXPERIMENTAL)
 
When force_viewer is False, inspect() displays basic image
statistics (mean, stddev) and then a representation of the image
that can be zoomed and panned.  Pressing various keys will give
different results described below in a region of interest described
by subplot_size:
 
      q - closes the most recent plot window when pressed in the
          main window
[space] - displays the X and Y coordinate (FITS standard unit
          indexed) and the count level
      a - performs aperture photometry on brightest feature in the
          region of interest (NOT YET IMPLEMENTED)
      c - displays a contour plot of the region of interest (see
          contour_levels)
      h - displays a histogram of the pixel values of the region of
          interest (see num_bins)
      r - displays a radial plot of the brightest feature in the
          region of interest
      s - displays a surface plot of the region of interest
      p - displays profile plots in both X and Y dimensions versus
          intensity (count level)
 
NOTE: None of the commands above work in the subplots.
is_compressed(self)
Find out if a FITS file is compressed
load_header(self)
Initialize self.header
load_image(self, readonly=0)
Initialize self.image.
make_background(self)
Make a background image,
 
Returns a new BaseFrame object. The name of the new file is
"name.back.fits"
make_subwinstat(self)
Compute statistics on subwindows
read_header(self)
Read a header into descriptors.
 
The descriptor is assumed to include a number of all caps
attributes that map directly to FITS header keywords. In
addition, if any of the following attributes are present, this
routine will initialize those attributes.
 
Initialized attributes: instrument, chip, filter, lamp, imstat,
astrom, observing_block, template
retrieve(self)
Retrieve this frame from the data server and uncompress it if it has
been compressed with FITSIO.
save(self, filename='', overwrite=1)
statistics(self, pixmap=None, zone=None)
Compute statistics and store in self.imstat.
 
Arguments:
   pixmap -- optional pixelmap object         (default=None)
   zone   -- optional region (x0, y0, x1, y1) (default=None)
update_header(self)
Update a header with values from descriptors
update_history(self)
Update a header with history
 
History is maintained in the instance attribute
history. History is written by appending string to the history
list.

Methods inherited from common.database.DataObject.DataObject:
FileName(self)
Return the pathame of the object
Name(self)
Return the name of the object
check_mandatory_dependencies(self)
check if all the mandatory dependencies are set
derive_hash(self)
Apply hashing function to the contents of the file that is part of
this object.
 
The SHA hashing function is used to calculate a hash value of the
contents of this DataObject. The hash value is returned as a
hexadecimal string.
distinct(self, param_list)
This method returns the distinct values from an input list. The
current implementation is kinda cheesy.
exists(self)
Test is the file existsts
get_canonical_name(self, processlevel='')
The canonical name of a DataObject.
get_pathname(self)
Getter for pathname
is_on_dataserver(self)
Checks if file is accessable on the dataserver.
 
NOTE: A return of False does NOT imply the file is not on any
      dataserver!  It is simply not on any accessable
      dataserver.
is_stored(self)
locate(self)
See common/net/dataserver_client.py (Data_IO.locate).
 
Returns a list of strings describing all dataservers where the file is
located as well as a few properties of the file, i.e.
 ['ip=...,port=...,path=...,size=...,mdate=...,
  'ip=...,port=...,path=?,size=?,mdate=?']
 
Question marks indicate that this dataserver is not reachable.
name_insert_suffix(self, suffix)
name_replace_suffix(self, suffix)
name_with_new_suffix(self, suffix)
release(self)
set_pathname(self, pathname)
Setter for pathname
set_process_parameters_from_dict(self, pars={})
pars is a dictionary of the type e.g.:
{'BiasFrame.process_params.SIGMA_CLIP':8}
set_stored(self)
set_user_config(self, pars={})
store(self)
store_with_hash_as_name(self, prefix='', suffix='fits')
Name the file after the hash value of the file and store it.
 
First the hash value of the file is calculated. The pathname of the
dataobject is renamed to the hash value with the given suffix appended.
Then the file is stored.

Class methods inherited from common.database.DataObject.DataObject:
is_cal(cls) from common.database.DBMeta.DBObjectMeta
Test for being cal, derived raw classes should set _IS_CAL to 1
is_config(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_CONFIG to 1
is_raw(cls) from common.database.DBMeta.DBObjectMeta
Test for being raw, derived raw classes should set _IS_RAW to 1
is_science(cls) from common.database.DBMeta.DBObjectMeta
Test for being science, derived raw classes should set _IS_SCIENCE to 1
is_seq(cls) from common.database.DBMeta.DBObjectMeta
Test for being seq, derived raw classes should set _IS_SEQ to 1
is_support(cls) from common.database.DBMeta.DBObjectMeta
Test for being config, derived raw classes should set _IS_SUPPORT to 1

Data descriptors inherited from common.database.DataObject.DataObject:
pathname

Data and other attributes inherited from common.database.DataObject.DataObject:
filepath = './'
localname = ''
mandatory_dependencies = ()
storage = <common.net.dataserver_client.Storage at 0x13e1560>

Methods inherited from common.database.DBMain.DBObject:
__del__(self)
Destructor for the DBObject
 
This destructor is called by the garbage collector for the transient
part of the DBObject. When it is called it calls the gc_transient()
method of the DBProxy implementation. The implementation of the
gc_transient() method can then decide what to do with the persistent
counterpart.
E.g. the database can be synchronized with its transient counterpart.
Another possibility is that the gc_transient() implementation checks
whether any attributes of a read-only object have changed since an
object was fetched from the database. If there are differences an
exception can be raised.
__reduce__(self)
Method necessary to create picklable objects
 
This mehod return a tuple containg a function object used for
unpickling and a picklable state tuple, to be used as argument
to the unpickle function. If necessary this object is registered
in the pickle cache
as_dict(self, seqnr=1, dependency_name='', dictionary={}, allow_lazy_typed_list=False)
Method much like the info method, but returns a dictionary.
 
Dictionary looks like:
  {'<classname>.<property1_name>.<property2_name>': value,
   '<classname>.<property2_name>.<property3_name>': value}
 
Problem: infinite loops for cold/flat dependencies. It seems a maximum
recursion depth limits the problem.
get_creator(self)
Returns the name of the user who created this object.
get_persistent(self)
get_project(self)
Returns the name of the project to which this object belongs.
info(self, level=0, doc=False, _indent=0, _printclass=True)
Print the values of all persistent properties of the object.
 
level       : level of introspection
doc         : display docstrings for attributes
_indent     : internal parameter used for formatting
_printclass : internal parameter used for formatting
inverse_objects(self, max_results=100)
Iterate through and return all objects that use the current object
max_results     The maximum number of objects returned per query
inverse_query(self)
go through all inverse properties to see if this object is used
persists(self)
Returns whether an object is already made persistent or transient.
recommit(self)
Commits changes to an object, without following links.

Class methods inherited from common.database.DBMain.DBObject:
get_inverse_properties(cls, props=None) from common.database.DBMeta.DBObjectMeta
return all inverse properties 
that are all the properties that point to this class

Data descriptors inherited from common.database.DBMain.DBObject:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from common.database.DBMain.DBObject:
__metaclass__ = <class 'common.database.DBMeta.DBObjectMeta'>
This is the metaclass for persistent classes
 
Provides:
  __new__ -- manages class construction
  __call__ -- manages object instantiation
database = <common.database.DBOracle.DBProxy instance at 0x2aaab633a170>
pickle_id = None

Methods inherited from astro.main.ProcessTarget.ProcessTarget:
check_observing_blocks(self, childs)
check if all childs have the same observing_block
check_templates(self, childs)
check if all childs have the same template
compare(self)
Quality Control -- basic trend analysis
 
The compare() method is used for default trend analysis. This
is done by comparing with a previous version of the same
object (last weeks bias, for example). This may be as simple
as comparing attribute values, but may also involve more
complex computations (e.g., subtracting the two images, and
analysing the residuals)
derive_timestamp(self)
Set the creation_date attribute
get_dependencies(self)
Return a list of names of attributes that are required for make()
get_qcflags_set(self)
Return a list of names of flags that have been set.
get_qcflags_set_dict(self)
Return a dictionary of flags that have been set.  The key is the
name, the value is a tuple of (index, docstring).
is_compared(self)
Return true if the object has been compared
is_inspected(self)
Return true if the object has been inspected
is_made(self)
Return true if the object has been made
is_ok(self)
Return true if no quality control flags have been set.
is_verified(self)
Return true if the object has been verified
set_compared(self)
Set the process status to indicate that the object has been
compared.
set_inspected(self)
Set the process status to indicate that the object has been
inspected.
set_made(self)
Set the process tatus to indicate that the object has been made
set_verified(self)
Set the process status to indicate that the object has been
verified.
verify(self)
Quality Control -- internal consistency
 
This method inspects the values of various attributes of the
object to see if these are within the expected range for that
object. The purpose of this method is mostly to perform
sanity-checks on measured results. It is assumed that the
required measurements (for example image statistics) are done
during data reduction (i.e. while executing make()), and stored
in persistent attributes.

Class methods inherited from astro.main.ProcessTarget.ProcessTarget:
get_qcflags(cls) from common.database.DBMeta.DBObjectMeta
Return a list of attribute names of QCflag() objects.
select(cls, **searchterms) from common.database.DBMeta.DBObjectMeta
Class method to select RawFrames, Calfiles and ReducedScienceFrames
from the database.
 
Syntax example:
 
q = RawScienceFrame.select(instrument='WFI', filter='#842',
    chip='ccd50', time_from='2000-01-02 04:45:46',
    time_to='2000-01-02 05:03:00')
 
Possible search terms:
----------------------
check_quality  - (Default 1) Exclude invalidated data (quality_flags!=0)
check_validity - (Default 1) Exclude invalidated data (is_valid=0)
chip        - select of the same CCD ('ccd50', 'ccd51', etc.)
date        - select of the same date (i.e. date at the start of
              observing night, in yyyy-mm-dd format)
exptime     - select frames with similar exposure time
              (EXPTIME-0.8sec to EXPTIME+0.8 sec)
extension   - select (raw) frames for a certain extension of its
              RawFitsData object
filename    - select a frame(!) by its filename
filter      - select of the same filter ('#842', '#843', etc.)
instrument  - select of the same instrument ('WFI', 'WFC', 'OCAM')
object      - select for OBJECT header keyword, uses "like"
              functionality, which allows wildcards "*" and "?"
time_from   - precise form of date, in yyyy-mm-dd hh:mm:ss format
time_to     - required when using time_from
select_for_raw(cls, raw, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Class method to select the most recent valid calfile for the
provided raw frame from the database.
select_for_reduced(cls, reduced, overscan=None, check_quality=1, check_validity=1) from common.database.DBMeta.DBObjectMeta
Synonym for the select_for_raw method; the implementation should
be identical.

Data and other attributes inherited from astro.main.ProcessTarget.ProcessTarget:
PROCESS_TIME = 0
STATUS_COMPARE = 2
STATUS_INSPECT = 3
STATUS_MAKE = 0
STATUS_VERIFY = 1

Class methods inherited from common.database.DBMeta.DBMixin:
get_persistent_attributes(cls) from common.database.DBMeta.DBObjectMeta
return a list of persistent attributes

Methods inherited from astro.main.OnTheFly.OnTheFly:
Flagged(self)
Check if any flag is set
return 1 for flag is set
return 0 no flag
after_do_make(self, switches=None)
extra make statements, this method can be overridden by OnTheFly classes to
implement extra make statements which will be executed after the make of self
after_set_onthefly_dependencies(self, switches, advanced)
this method is called after the onthefly method set_onthefly_dependencies
derived classes can implement this method to customize the dependencies
setting after this has been done automatically by onthefly
after_uptodate_object(self, dependencies_missing, dependencies_new, dependencies_obsolete)
The uptodate_object method determines if the object is uptodate, and will result in three listings :
 dependencies_missing - missing mandatory dependencies
 dependencies_new - new dependencies
 dependencies_obsolete - current dependencies that are obsolete
Derived classes can override this method to tweak the listings
check_for_mandatory(self, dep_str, dep_new)
check if dependency is mandatory and present
dep_str is the name of the attribute, dep_new is the (attribute) object
get_onthefly_dependencies(self, advanced=None)
Method retrieves a list of all dependencies used for
on-the-fly processing
Return: [dependency, dependency class, dependency name]
uptodate(self, date_time=None, template=None, switches=None, advanced=None)
This method checks if the object is up-to-date, for the given datetime.
OnTheFly_uptodate class has the functionality for checking uptodate

Class methods inherited from astro.main.OnTheFly.OnTheFly:
exist(cls, date_time=None, chip=None, filter=None, object_id=None, parent=None, parent_attr=None, template=None, extra=[], advanced=None, switches=None) from common.database.DBMeta.DBObjectMeta
for the given parameters and class return the most
recent object(s), or None
get_onthefly(cls, date_time=None, filter=None, chip=None, object_id=None, advanced=None, switches=None, template=None, parent=None, parent_attr=None) from common.database.DBMeta.DBObjectMeta
For the given parameters and class get the object,
if the object does not exist -> make it.
This is done recursively for all dependencies.
 
The object can only be made if there are raws

 
class GalPhotSource
    The source we want to model with Galphot
 
  Methods defined here:
__init__(self)
find_neighbours(self)
GalPhotSource may have objects that are close and bright enough to
influence the fit. These sources must be identified and masked or
modelled as well.
get_fit_region(self)
Based on the source position and its size this method returns the
minimum and maximum x and y values of the region in the frame.
set_attributes_from_sid(self, sid, sourcelist=None)
set_neighbour(self, sid)

Data and other attributes defined here:
required_params = ['RA', 'DEC', 'Xpos', 'Ypos', 'A', 'B', 'POSANG', 'MAG_ISO', 'FLUX_RADIUS', 'BackGr']

 
Functions
       
boundaries(alist, value)
Return the tuple (sub, sup), where
sub = greatest value in "alist" <= value
sup = smallest value in "alist" >= value
interpolate(p1, p2, xval=None, yval=None)
Linear interpolation between the points p1 and p2, which are
tuples of (x,y) position. If xval is given, the corresponding yval
according to the linear interpolation is given, and vice versa.
sersic_deviations(p, fjac=None, x=None, y=None, err=None)
This function is used in "mpfit" to fit the parameters of the Sersic
profile: re (effective radius), mu (surface brightness) and N (power). It
returns the deviations of the data points x, y from the Sersic profile
defined by the 3 parameters in the list p.
 
x,y : data points (arrays of radii and surface brightness)
p   : list of the parameters of the Sersic function: [re, mu, N]
err : 1-sigma uncertainties in y

 
Data
        Env = {'astrometric_refcat': '/aw01/users/catalog/USNO-A2/', 'aw_usno_url': 'http://dbusno.astro-wise.org/', 'aweshell': 'awe', 'awvo_url': '', 'baseconf_dir': '/astro-wise/awehome/config', 'calts_server': 'calts.astro-wise.org', 'data_port': '8000', 'data_server': 'ds.astro.rug.astro-wise.org', 'database_api': 'cx_Oracle', 'database_engine': 'oracle_10g', ...}
__version__ = '@(#)$Revision: 1.85 $'