astro.toolbox.photometry package

Submodules

astro.toolbox.photometry.extcurve_generator module


CATEGORY : tools, photometry

PURPOSE : generating an extinction curve file that maps onto the
PhotExtinctionCurve class in ./opipe/astro/main.

This tool is used to create an extinction curve file from an input ASCII-file. The output is in LDAC fits format with an OBJECTS and FIELDS table.

The input ASCII-file must contain two columns : wavelength, extinction. The wavelength bins should be equally spaced.

Optionally, the extinction curve can after creation be committed to the database by setting the -commit switch on the command line. However, in that case the file that has been created will be deleted.


Mandatory parameters :

-i : input ASCII file

-incr : wavelength increment

Optional parameter :

-commit : commit the extinction curve to the database
Example : make an extinction curve table for the La Palma standard
extinction curve, and commit the result to the database. The wavelength bin size is 50.0 Angstroms.

Command : awe extcurve_generator -i lapalma.txt -incr 50.0 -commit


astro.toolbox.photometry.extcurve_generator.commit_to_database()
astro.toolbox.photometry.extcurve_generator.create_objects_and_fields_tables(inlist, increment)
astro.toolbox.photometry.extcurve_generator.main()
astro.toolbox.photometry.extcurve_generator.make_extinctioncurve(input_file, increment, commit=0)
astro.toolbox.photometry.extcurve_generator.parse_command_line()
astro.toolbox.photometry.extcurve_generator.read_contents_of_input_file(input_file)
astro.toolbox.photometry.extcurve_generator.remove_superfluous_fields_from_output()
astro.toolbox.photometry.extcurve_generator.usage()

astro.toolbox.photometry.ingest_extinction module


CATEGORY : tools, photometry.

PURPOSE : generating valid entries for extinction coefficients into the DB.


This tool is used to insert AtmosphericExtinctionCoefficient objects into the database for a specified filter.

The tool assumes that a database is active; it actively queries the database for the requested filter.


Mandatory parameters :

-e : extinction coefficient
-err : error on extinction coefficient (1 sigma?)
-f : filter name
-i : instrument name

-start : start of validity range in yyyy-mm-dd (timestamp_start) -end : end of validity range in yyyy-mm-dd (timestamp_end)

Optional parameter :

-commit : commit result to the database

Examples of use :

awe ingest_extinction.py -e 0.46 -f #877 -i WFI -commit -start 2003-02-11
-end 2003-02-12

astro.toolbox.photometry.ingest_extinction.create_timestamps(start, end)
astro.toolbox.photometry.ingest_extinction.main()
astro.toolbox.photometry.ingest_extinction.make_extinctioncoefficients(extinction_value, extinction_value_error, filter_name, instrument_name, start, end, commit=0)
astro.toolbox.photometry.ingest_extinction.parse_command_line()
astro.toolbox.photometry.ingest_extinction.retrieve_chip_from_database(chip_name)
astro.toolbox.photometry.ingest_extinction.retrieve_chip_list(instrument_name)
astro.toolbox.photometry.ingest_extinction.retrieve_from_database(filter_name, instrument_name)
astro.toolbox.photometry.ingest_extinction.usage()

astro.toolbox.photometry.ingest_gain module


CATEGORY : tools, initialization

PURPOSE : make an entry into the database for the gain


This tool is used to make an entry into the database for the gain of a specific chip. The tool is used to initialize the processing part of the system.

The tool assumes that a database is active; it actively queries the database for the requested chip and instrument.

By default, the gain is not committed to the database. If the gain should be committed, to the database the optional -commit switch must be set on the commandline.


Mandatory parameters :

-c : chip name -i : instrument name -g : value of gain

Optional parameter :

-commit : commit result to the database

Example of use :

awe ingest_gain.py -c A5382-1-7 -i WFC -g 2.0

astro.toolbox.photometry.ingest_gain.main()
astro.toolbox.photometry.ingest_gain.make_gainlinearity(chip_name, instrument_name, gain, commit=0)
astro.toolbox.photometry.ingest_gain.parse_command_line()
astro.toolbox.photometry.ingest_gain.usage()

astro.toolbox.photometry.ingest_illuminationmap module


CATEGORY : tools, photometry

PURPOSE : ingesting an illumination correction map into the database


This tool is used to ingest an illumination correction map into the database.

The data content of the map is read in from an input ASCII-file. This input ASCII-file must contain exactly seven columns (in this order):

chip name, C_0, C_x, C_y, C_xx, C_xy, C_yy

with one line for every chip included in the map. The C_a are the coefficients in the fitting formula :

z(X, Y) = C_0 + C_x*X + C_y*Y + C_xx*X*X + C_xy*X*Y + C_yy*Y*Y

with z(X, Y) the zeropoint as a function of pixel-position (X, Y).

The tool assumes that a database is active; it actively queries the database for the requested filter and instrument.

The illumination correction table will after creation only be committed to the database if the “-commit” switch was set on the command line.


Mandatory parameters :

-i : input ASCII file
-f : filter name

-instr : instrument name -start : start of validity range in yyyy-mm-dd (timestamp_start) -end : end of validity range in yyyy-mm-dd (timestamp_end)

Optional parameter :

-commit : commit the illumination correction map to the database
Example : make an illumination correction map for the INT g’ filter, and
commit the result to the database. The table is valid from 1 Jan 2000 until 1 Jan 2005.
Command : awe ingest_illuminationmap.py -i wfc.txt -f 220 -instr WFC
-commit -start 2000-01-01 -end 2005-01-01

astro.toolbox.photometry.ingest_illuminationmap.create_timestamps(start, end)
astro.toolbox.photometry.ingest_illuminationmap.main()
astro.toolbox.photometry.ingest_illuminationmap.make_illuminationmap(input_file, filter_name, instrument_name, start, end, commit)
astro.toolbox.photometry.ingest_illuminationmap.parse_command_line()
astro.toolbox.photometry.ingest_illuminationmap.read_contents_of_input_file(input_file)
astro.toolbox.photometry.ingest_illuminationmap.retrieve_from_database(filter_name, instrument_name)
astro.toolbox.photometry.ingest_illuminationmap.usage()

astro.toolbox.photometry.ingest_photometrics module


CATEGORY : tools, photometry.

PURPOSE : generating a valid Calfile 563 that is used in photometric
calibration.

This tool is used to ingest a Calfile 563 into the database that contains a default value for the zeropoint and the atmospheric extinction. This Calfile is produced for the chip, filter and instrument specified on the commandline. The values for the zeropoint and the extinction should be given on the commandline. Optionally, an error on the zeropoint can also be given.

The tool assumes that a database is active; it actively queries the database for the requested chip, filter and instrument.

The photometric CalFile will after creation only be committed to the database if the “-commit” switch was set on the commandline.


Mandatory parameters :

-z : value of the zeropoint
-e : value of the extinction coefficient
-c : chip name
-f : filter name
-i : instrument name

-start : start of validity range in yyyy-mm-dd (timestamp_start) -end : end of validity range in yyyy-mm-dd (timestamp_end)

Optional parameters :

-ze : error of the zeropoint (default : 0.00)

-commit : commit result to the database

Example of use :

awe ingest_photometrics.py -z 25.12 -ze 0.04 -e 0.19 -c A5382-1-7
-f 220 -i WFC -commit -start 1990-01-01 -end 2030-01-01

astro.toolbox.photometry.ingest_photometrics.create_timestamps(start, end)
astro.toolbox.photometry.ingest_photometrics.main()
astro.toolbox.photometry.ingest_photometrics.make_photometricparameters(zeropoint_value, zeropoint_error, extinction_value, chip_name, filter_name, instrument_name, start, end, commit=0)
astro.toolbox.photometry.ingest_photometrics.parse_command_line()
astro.toolbox.photometry.ingest_photometrics.retrieve_from_database(chip_name, filter_name, instrument_name)
astro.toolbox.photometry.ingest_photometrics.usage()

astro.toolbox.photometry.ingest_transformation module


CATEGORY : tools, photometry

PURPOSE : ingesting a transformation table into the database.


This tool is used to create a transformation table in the database for a given filter and instrument.

The transformation table will after creation only be committed to the database if the “-commit” switch was set on the command line.


Mandatory parameters :

-p : the primary band (eg JohnsonB)
-s : the secondary band (eg JohnsonB)
-t : the tertiary band (eg JohnsonV)
-ct : the value for the color term (eg 0.050)
-cte : the value for the color term error (eg 0.005)
-d : the value for the coefficient (eg 0.400)
-de : the value for the coefficient errorr (eg 0.005)
-f : filter name
-i : instrument name

-start : start of validity range in yyyy-mm-dd (timestamp_start) -end : end of validity range in yyyy-mm-dd (timestamp_end)

Optional parameter :

-commit : commit the transformation table to the database
Example : make a transformation table for the WFI broad-band V filter, and commit
the result to the database. The table is valid from 1 Jan 2000 until 1 Jan 2005.
Command : awe ingest_transformation.py -p JohnsonB -s JohnsonB -t Johnson V
-ct 0.10 -cte 0.01 -d 0.40 -de 0.01 -f #843 -i WFI -start 2000-01-01 -end 2005-01-01 -commit

astro.toolbox.photometry.ingest_transformation.check_validity_of_filter_and_instrument(filter_name, instrument_name)
astro.toolbox.photometry.ingest_transformation.check_validity_of_input_bands(primary, secondary, tertiary)
astro.toolbox.photometry.ingest_transformation.create_timestamps(start, end)
astro.toolbox.photometry.ingest_transformation.ingest_transformation(primary, secondary, tertiary, color_term, color_term_error, coefficient, coefficient_error, filter_name, instrument_name, start, end, commit=0)
astro.toolbox.photometry.ingest_transformation.main()
astro.toolbox.photometry.ingest_transformation.parse_command_line()
astro.toolbox.photometry.ingest_transformation.retrieve_from_database(filter_name, instrument_name)
astro.toolbox.photometry.ingest_transformation.usage()

astro.toolbox.photometry.sdss2refcat module


CATEGORY : tools, photometry

PURPOSE : generating a photometric standard star catalog file that maps
onto the PhotRefCatalog class in ./awe/astro/main.

This tool is used to create a photometric standard star catalog file from the results as returned from the SDSS Sky Server. The output is in LDAC fits format with a STDTAB table only.

A connection is made to the SDSS Sky Server website, and the stars located in the commandline-specified window are retrieved. This data is then converted into an LDAC catalog that maps onto the PhotRefCatalog class in ./awe/astro/main.


Mandatory parameters :

-ra : right ascension of the pointing (in degrees)
-dec : declination of the pointing (in degrees)

-size : size of the square window centered on the pointing (in degrees) -o : output file name

Optional parameters :

-max : set a maximum on the g magnitude of the stars (default : 21.0)
-dr : data release version (default : SDSS5)

Optional switch :

-skycat : also produce a catalog that can be overplotted in skycat
Example : awe sdss2refcat.py -ra 234.90 -dec -0.25 -size 0.50
-o my_cal569E.cat -max 22.0 -skycat -dr SDSS3

class astro.toolbox.photometry.sdss2refcat.SDSSDatabase

Bases: object

SKIP_OUTPUT_LINES = 1
make_dictionary_from_query_results(file_object)
origin()
quality_flag(condition)
query(sql_string)
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR10

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 10 database.

SKIP_OUTPUT_LINES = 2
origin()
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR3

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 3 database.

origin()
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR5

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 5 database.

origin()
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR7

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 7 database.

origin()
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR8

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 8 database.

origin()
class astro.toolbox.photometry.sdss2refcat.SDSSDatabaseDR9

Bases: astro.toolbox.photometry.sdss2refcat.SDSSDatabase

This class represents the Sloan Digital Sky Survey 9 database.

origin()
astro.toolbox.photometry.sdss2refcat.check_validity_of_equatorial_coordinates(ra, dec)

This little routine performs a sanity check on the input equatorial coordinates. It is assumed that the inputs are in degrees.

astro.toolbox.photometry.sdss2refcat.check_validity_of_window_size(window_size)
astro.toolbox.photometry.sdss2refcat.construct_sql_string(sdss_database, ra, dec, window_size, max_g=21.0)
astro.toolbox.photometry.sdss2refcat.convert_refcat_to_LDAC(inlist, output_file)
astro.toolbox.photometry.sdss2refcat.create_database(data_release)
astro.toolbox.photometry.sdss2refcat.derive_UBVRI_magnitudes_from_Sloan(star_dict)

This routine calculates the UBVRI magnitudes from the Sloan ugriz values.

astro.toolbox.photometry.sdss2refcat.main()
astro.toolbox.photometry.sdss2refcat.make_standard_catalog(star_dict, ubvri_dict, output_file, origin, name='NN')

This routine combines the data in the two input dictionaries into a form that maps onto the data structure of the requested standard star catalog, and converts the results into an LDAC fits file.

astro.toolbox.photometry.sdss2refcat.no_negative_magnitude_in(result_list)
astro.toolbox.photometry.sdss2refcat.parse_command_line()
astro.toolbox.photometry.sdss2refcat.usage()

astro.toolbox.photometry.sdss2refcat_wrapper module

For all Landolt fields request the appropriate Sloan field and combine in one catalog (SA_92_95_101_104_107_113_SDSS_DR7_2.5deg.cat)

astro.toolbox.photometry.sdss2refcat_wrapper.main()

astro.toolbox.photometry.skybrightness_generator module


CATEGORY : tools, photometry

PURPOSE : generating a skybrightness table file that maps onto the
PhotSkyBrightness class in ./opipe/astro/main.

This tool is used to create a skybrightness table file from an input ASCII-file. The output is in LDAC fits format with an OBJECTS and FIELDS table.

The input ASCII-file must contain two columns : lunar_phase, brightness. The lunar_phase should be in days after full moon, and the bins should be equally spaced. The brightness should be in magnitudes.

The input ASCII file should at least contain entries for NEW MOON and FULL MOON. These must have lunar_phase values of 0 and 14, respectively. The maximum number of entries allowed is 27.

A separate table must be created for every photometric band. The photometric band for which the table is to be created must be supplied through the -mag_id parameter. Examples of valid arguments are JohnsonV or SloanU.

Optionally, the skybrightness table can after creation be committed to the database by setting the -commit switch on the command line. However, in this case the file that has been created will be deleted.


Mandatory parameters :

-i : input ASCII file
-o : output LDAC fits file

-mag_id : photometric band

Optional parameter :

-commit : commit the skybrightness table to the database
Example : make a skybrightness table for the CousinsR photometric band,
and commit the result to the database.
Command : awe skybrightness_generator -i sky.txt -o sky.cat
-mag_id CousinsR -commit

astro.toolbox.photometry.skybrightness_generator.main()
astro.toolbox.photometry.skybrightness_generator.make_skybrightness_table(input_file, output_file, mag_id, commit=0)
astro.toolbox.photometry.skybrightness_generator.parse_command_line()
astro.toolbox.photometry.skybrightness_generator.read_contents_of_input_file(input_file)
astro.toolbox.photometry.skybrightness_generator.save_to_LDAC_fits(inlist, mag_id, output_file)
astro.toolbox.photometry.skybrightness_generator.usage()

astro.toolbox.photometry.transformations module

astro.toolbox.photometry.transformations.UBVRI_to_ugriz_Jester(jU=None, jB=None, jV=None, cR=None, cI=None, djU=None, djB=None, djV=None, dcR=None, dcI=None)

Based upon Jester et al transformations listed at: http://www.sdss.org/dr5/algorithms/sdssUBVRITransform.html Note: UBVRI mag errors need to be propagated.

astro.toolbox.photometry.transformations.UBVRI_to_ugrizprimed_Smith(U=None, B=None, V=None, R=None, I=None)
astro.toolbox.photometry.transformations.ugriz_to_UBVRI_Jester(su=None, sg=None, sr=None, si=None, sz=None)

Based upon Jester et al transformations listed at: http://www.sdss.org/dr5/algorithms/sdssUBVRITransform.html Note: ugriz mag errors need to be propagated.

astro.toolbox.photometry.transformations.ugriz_to_UBVRI_Lupton(u=None, g=None, r=None, i=None, z=None)
astro.toolbox.photometry.transformations.ugriz_to_UBVRI_Smith(u=None, g=None, r=None, i=None, z=None)
astro.toolbox.photometry.transformations.ugrizprimed_to_UBVRI_Smith(u=None, g=None, r=None, i=None, z=None)
astro.toolbox.photometry.transformations.ugrizprimed_to_ugriz(up=None, gp=None, rp=None, ip=None, zp=None)

See http://www.sdss.org/dr5/algorithms/jeg_photometric_eq_dr1.html#usno2SDSS

Module contents

This directory contains tools for the setup of the photometric pipeline.