| | |
- astro.main.Catalog.Catalog(astro.main.BaseCatalog.BaseCatalog)
-
- PhotSrcCatalog(astro.main.Catalog.Catalog, astro.main.OnTheFly.OnTheFly)
- astro.main.OnTheFly.OnTheFly
-
- PhotSrcCatalog(astro.main.Catalog.Catalog, astro.main.OnTheFly.OnTheFly)
- Mapper
-
- PhotSrcCatalogMapper
- common.database.DBMain.DBObject(__builtin__.object)
-
- PhotSrcCatalogParameters
- PhotSrcSource
- exceptions.Exception(exceptions.BaseException)
-
- NoStandardStarsFoundError
- PhotSrcCatalogError
class PhotSrcCatalog(astro.main.Catalog.Catalog, astro.main.OnTheFly.OnTheFly) |
| |
This class describes a list of sources measured for photometric
calibration which have been compared to a standard-star catalog. |
| |
- Method resolution order:
- PhotSrcCatalog
- astro.main.Catalog.Catalog
- astro.main.BaseCatalog.BaseCatalog
- common.database.DataObject.DataObject
- common.database.DBMain.DBObject
- __builtin__.object
- astro.main.OnTheFly.OnTheFly
Methods defined here:
- __init__(self, pathname='')
- apply_astrometry(self, measurement_frame)
- This method applies the given astrometric solution to the input
frame. This allows SExtractor to assign physical coordinates to the
sources it finds.
- associate_catalog(self)
- check_preconditions(self)
- clean_up(self)
- This method removes all the intermediate files that were created
during processing.
- copy_attributes(self)
- derive_catalog(self)
- derive_timestamp(self)
- extract_sources(self)
- This method converts the underlying association catalog into a list
of PhotSrcSource objects.
From every identified standard star in the catalog, the measured
magnitude and its magnitude as recorded in the reference catalog are
combined into a PhotSrcSource object.
- get_average_raw_zeropoint(self)
- get_content_of_catalog(self)
- get_default_config(self)
- return the sextractor parameters that differ from the defaults
- get_dict_of_pixel_positions(self)
- get_dict_of_raw_zeropoints(self)
- get_fixed_config(self)
- return the fixed sextractor parameters
- get_list_of_raw_zeropoints(self)
- get_median_raw_zeropoint(self)
- get_number_of_sources(self)
- get_source_attributes(self)
- get_source_data(self, columns)
- inspect(self)
- load(self)
- make(self)
- A source catalog is derived from the input frame and compared with
the input catalog of reference stars. The final output consists of a
source catalog which only includes those sources for which an
association with a reference star was made.
Required inputs :
frame -- fully reduced frame from which a Sextractor
catalog is derived
astrom_params -- the astrometric calibration associated with
the input frame
refcat -- a standard star catalog
Addidtional required input for a frame observed in a not key-band
filter :
transform -- a table with transformation parameters
Process configuration parameters :
sexconf -- Sextractor configuration
process_params -- the PhotSrcCatalog configuration
Process result :
-- a list of identified standard stars
-- the skybackground as measured from the input frame
-- the airmass and observation date of the input frame
- make_skycat(self)
- This method creates a dump of the catalog that can be used to
overplot images in skycat.
- save(self)
- set_sky_background(self)
- This method calculates the skybackground from the image statistics
of the input frame and adds the result to the contents of the
catalog.
Data descriptors defined here:
- airmass
- The effective airmass [None]
- astrom_params
- Information about the derived astrometry [None]
- chip
- Information about the chip [None]
- creation_date
- Date this object was created [None]
- date_obs
- Date of the observation of the associated frame [None]
- filename
- The name of the associated file [None]
- filter
- Information about the filter [None]
- frame
- Pixel data from which the catalog will be derived [None]
- globalname
- The name used to store and retrieve file to and from Storage [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
- observing_block
- Information about the observing block [None]
- photsourcelist
- Contents of the catalog (list of PhotSrcSources) [None]
- process_params
- Processing parameters [None]
- refcat
- The input reference catalog [None]
- seeing
- Seeing estimate for SExtractor configuration [pixel]
- sexconf
- The SExtractor configuration [None]
- sexparam
- Additional extraction parameters [None]
- skybackground
- The sky background [count]
- sourcecount
- Number of detected objects [None]
- template
- Information about the template [None]
- threshold
- SExtractor detection threshold [None]
- transform
- An optional transformation table [None]
- weight
- The weights associated with the frame [None]
- weightscale
- The weight scale [None]
- zeropoint
- Photometric zeropoint [mag]
Data and other attributes defined here:
- PROCESS_TIME = 70
- mandatory_dependencies = (('frame', 1), ('astrom_params', 1), ('refcat', 1))
Methods inherited from astro.main.Catalog.Catalog:
- copy_attributes_from_frame(self)
- Copy catalog attributes from the frame object
Requires:
frame -- the BaseFrame object
Updates:
weight -- from frame.weight
zeropoint -- from frame.get_zeropoint()
- get_mag_id(self)
- get_records(self, table, keyword_list)
- Return a list of records from the given table.
Records will be dictionaries of key value pairs, with the keys
from the keyword_list.
- get_sex_config(self)
- calculate and return the fixed sextractor parameters
- getlist(self, table, keyword_list)
- make_asciitable(self, tabname='OBJECTS', colnames=[])
- run_sextractor(self)
- set_number_of_sources(self, number_of_sources)
- set_sextractor_config(self)
- Configure sextractor
Requires:
frame -- the detection frame
threshold -- The sextractor detection threshold
seeing -- used to determine SEEING_FWHM and FILTER (optional)
weight -- used to determine WEIGHT_TYPE and WEIGHT_IMAGE (optional)
zeropoint -- used to detemine MAG_ZEROPOINT (optional)
Updates:
sexconf -- The SextractorConfig object
Based on the catalog attributes a sextractor configuration
object is created.
- set_weightscale(self, weightscale)
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
- commit(self)
- 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)
- retrieve(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_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 = ''
- storage = <common.net.dataserver_client.Storage at 0x2aaab8a14bd8>
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 0x2aaab36d1248>
- 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:
- 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 PhotSrcCatalogMapper(Mapper) |
| |
This class is dedicated to converting a PhotSrcCatalog object to LDAC
fits and vice-versa. |
| |
Methods defined here:
- get_canonical_name(self, photcat)
- get_filter(self, filter_name, mag_id, cwl)
- load_from_LDAC_fits(self, photcat)
- This method constructs the original PhotSrcCatalog object from the
LDAC fits file. The list of PhotSrcSource objects is instantiated from
the OBJECTS table of the input file, whereas the other relevant
attributes of the object are reconstructed from the FIELDS table.
- save_to_LDAC_fits(self, photcat)
- This method "pickles" the PhotSrcCatalog object to an LDAC fits
file. The LDAC file contains a FIELDS and an OBJECTS table. The
data-structure of the OBJECTS table is defined in self.PHOTSRC_CONF.
Static methods defined here:
- get_instance()
Data and other attributes defined here:
- PHOTSRC_CONF = [('VERBOSE', 'NORMAL'), ('COL_NAME', 'index'), ('COL_TTYPE', 'SHORT'), ('COL_HTYPE', 'INT'), ('COL_COMM', '""'), ('COL_UNIT', '""'), ('COL_DEPTH', '1'), ('COL_NAME', 'origin'), ('COL_TTYPE', 'STRING'), ('COL_HTYPE', 'STRING'), ('COL_COMM', '""'), ('COL_UNIT', '""'), ('COL_DEPTH', '10'), ('COL_NAME', 'Ra'), ('COL_TTYPE', 'DOUBLE'), ('COL_HTYPE', 'FLOAT'), ('COL_COMM', '""'), ('COL_UNIT', 'deg'), ('COL_DEPTH', '1'), ('COL_NAME', 'Dec'), ...]
Methods inherited from Mapper:
- get_chip(self, chip_name)
- get_instrument(self, instrument_name, telescope_name)
|
class PhotSrcCatalogParameters(common.database.DBMain.DBObject) |
| | |
- Method resolution order:
- PhotSrcCatalogParameters
- common.database.DBMain.DBObject
- __builtin__.object
Methods defined here:
- check(self)
- get_flux_type(self)
Data descriptors defined here:
- FLUX_TYPE
- The type of the measured flux [None]
- MAX_MAG_DIFF
- The maximum difference of a standard star with respect to the median [mag]
- SOURCE_CODE_VERSION
- The version of the source code [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
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 0x2aaab36d1248>
- pickle_id = None
|
class PhotSrcSource(common.database.DBMain.DBObject) |
| |
This class describes a single source used for photometric calibration.
This source is the measured one and has been associated with a source in a
standard-star catalog. |
| |
- Method resolution order:
- PhotSrcSource
- common.database.DBMain.DBObject
- __builtin__.object
Methods defined here:
- get_content(self)
- get_data(self, columns)
- get_pixel_position(self)
- get_raw_zeropoint(self)
Static methods defined here:
- get_attributes()
Data descriptors defined here:
- dec
- Declination of the source [deg]
- index
- Index of the source [None]
- instmag
- Instrumental magnitude [mag]
- instmag_err
- Instrumental magnitude error [mag]
- mag
- Magnitude of the source [mag]
- mag_err
- Magnitude error [mag]
- 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
- origin
- Origin of the source [None]
- ra
- Right Ascension of the source [deg]
- x_position
- The pixel x-position of the source [pixel]
- y_position
- The pixel y-position of the source [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 0x2aaab36d1248>
- pickle_id = None
| |