| | |
- astro.main.OnTheFly.OnTheFly
-
- PhotTransformation(common.database.DBMain.DBObject, astro.main.OnTheFly.OnTheFly)
- common.database.DBMain.DBObject(__builtin__.object)
-
- PhotTransformation(common.database.DBMain.DBObject, astro.main.OnTheFly.OnTheFly)
- exceptions.Exception(exceptions.BaseException)
-
- PhotTransformationError
class PhotTransformation(common.database.DBMain.DBObject, astro.main.OnTheFly.OnTheFly) |
| |
This class represents the transformation parameters from the key bands
to the specified user band. |
| |
- Method resolution order:
- PhotTransformation
- common.database.DBMain.DBObject
- __builtin__.object
- astro.main.OnTheFly.OnTheFly
Methods defined here:
- __init__(self, pathname='')
- check(self)
- derive_error(self, mag_error, color, color_err)
- get_color_for_filter(self)
- This method returns the color used for transforming the magnitudes
for the relevant filter.
- get_dict_of_transformed_magnitudes(self, refcat, index_list=[])
- This method returns a dictionary of transformed magnitudes.
The transformed magnitudes (M_T) are derived from the magnitudes in the
input reference catalog (refcat) using the following equation:
M_T = M_prm - color_term * color + coefficient
with M_prm and the color as obtained from the reference catalog.
- load(self)
- save(self)
Class methods defined here:
- exist(cls, date_time=None, filter=None, **args) from common.database.DBMeta.DBObjectMeta
- Search for PhotTransformation for on-the-fly processing.
- is_cal(cls) from common.database.DBMeta.DBObjectMeta
- is_raw(cls) from common.database.DBMeta.DBObjectMeta
- is_science(cls) from common.database.DBMeta.DBObjectMeta
Static methods defined here:
- get(date, filter, instrument=None)
- This static method is used to retrieve a PhotTransformation object
from the database.
The "date" input parameter is a string of the form yyyy-mm-dd, and
"filter" is a string designating the filter. Examples: "2000-04-10" and
"#843".
- select_for_raw(raw)
- This static method emulates the "select_for_raw" from
ProcessTarget.
Data descriptors defined here:
- coefficient
- An additional offset [mag]
- coefficient_error
- The error in the additional offset [mag]
- color_term
- The color term [mag]
- color_term_error
- The error in the color term [mag]
- creation_date
- Date this object was created [None]
- filter
- Information about the filter [None]
- instrument
- Information about the instrument [None]
- is_valid
- Manual/external flag to disqualify bad data (SuperFlag) [None]
- mag_id
- Identifier for the photometric band [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
- primary_band
- First key filter mag_id [None]
- quality_flags
- Automatic/internal quality flag [None]
- secondary_band
- Second key filter mag_id [None]
- tertiary_band
- Third key filter mag_id [None]
- timestamp_end
- End of valid period [None]
- timestamp_start
- Start of valid period [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.
- 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 0xfd9a70>
- pickle_id = None
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:
- 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
|
|