ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
cscripts.csobsdef.csobsdef Class Reference
Inheritance diagram for cscripts.csobsdef.csobsdef:

Public Member Functions

def __init__
 
def process
 
def save
 
def obs
 
def pntdef
 

Private Member Functions

def _get_parameters
 
def _set_irf
 

Private Attributes

 _obs
 
 _pntdef
 
 _tmin
 

Detailed Description

Creates an observation definition file from a pointing list

The pointing list is a comma-separated value ASCII file with header
keywords in the first row followed by a list of pointings (one
pointing per row). The following header keywords are supported (case
sensitive, column order irrelevant):

name       - Observation name string
id         - Unique observation identifier string
ra         - Right Ascension of pointing (deg)
dec        - Declination of pointing (deg)
lon        - Galactic longitude of pointing (deg)
lat        - Galactic latitude of pointing (deg)
tmin       - Start of pointing (seconds)
duration   - Duration of pointing (seconds)
emin       - Lower energy limit (TeV)
emax       - Upper energy limit (TeV)
rad        - Radius of region of interest (deg)
deadc      - Deadtime correction factor [0-1]
instrument - Name of Cherenkov telescope
caldb      - Calibration database
irf        - Response function name

Only the pairs (ra,dec) or (lon,lat) are mandatory header keywords.
All other keywords are optional and can be specified when calling
csobsdef as user parameters. The only exception is the "duration"
keyword that will automatically be queried.

Examples:

    ./csobsdef
        Creates minimal observation definition file.

    ./csobsdef emin=0.1 emax=100.0
        Creates observation definition file with an energy range
        100 GeV - 100 TeV.

    ./csobsdef rad=5
        Creates observation definition file with a ROI radius of
        5 degrees.

    ./csobsdef caldb=prod2 irf=South_50h
        Creates observation definition file using the "South_50h"
        IRF in the "prod2" calibration database of CTA.

Definition at line 29 of file csobsdef.py.

Constructor & Destructor Documentation

def cscripts.csobsdef.csobsdef.__init__ (   self,
  argv 
)
Constructor

Parameters
----------
argv : list of str
    List of IRAF command line parameter strings of the form
    ``parameter=3``.

Definition at line 78 of file csobsdef.py.

Member Function Documentation

def cscripts.csobsdef.csobsdef._set_irf (   self,
  obs,
  caldb,
  irf 
)
private
Set response for an observation

The method creates an XML element so that that the response XML
writer will write the database and response name into the
observation definition file.

Parameters
----------
obs : `~gammalib.GCTAObservation`
    CTA observation
caldb : str
    Calibration database
irf : str
    Instrument response function

Returns
-------
obs : `~gammalib.GCTAObservation`
    CTA observation with response attached

Definition at line 119 of file csobsdef.py.

Referenced by cscripts.csobsdef.csobsdef.process().

def cscripts.csobsdef.csobsdef.obs (   self)
Returns observation container
-----
Returns
obs : `~gammalib.GObservations`
    Observation container

Definition at line 375 of file csobsdef.py.

References cscripts.csiactobs.csiactobs._obs, and cscripts.csobsdef.csobsdef._obs.

Referenced by cscripts.cslightcrv.cslightcrv._adjust_model_pars(), cscripts.csscs.csscs._adjust_model_pars(), cscripts.csspec.csspec._adjust_model_pars(), cscripts.cstsmapsplit.cstsmapsplit._compute_null_hypothesis(), cscripts.csphasecrv.csphasecrv._create_fits_table(), cscripts.cslightcrv.cslightcrv._create_fits_table(), cscripts.cslightcrv.cslightcrv._create_tbounds(), cscripts.csspec.csspec._fit_model(), cscripts.csbkgmodel.csbkgmodel._generate_runwise_bkg(), cscripts.csphasecrv.csphasecrv._get_free_par_names(), cscripts.cslightcrv.cslightcrv._get_free_par_names(), cscripts.csbkgmodel.csbkgmodel._get_instrument(), cscripts.csobsselect.csobsselect._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csresmap.csresmap._get_parameters(), cscripts.csresspec.csresspec._get_parameters(), cscripts.csobsinfo.csobsinfo._get_parameters(), cscripts.cstsmapsplit.cstsmapsplit._get_parameters(), cscripts.csobs2caldb.csobs2caldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphagen.csphagen._get_parameters_bkgmethod_custom(), cscripts.csphagen.csphagen._get_parameters_bkgmethod_off(), cscripts.cssens.cssens._get_sensitivity(), cscripts.csspec.csspec._log_spectral_binning(), cscripts.csscs.csscs._mask_observations(), cscripts.csphasecrv.csphasecrv._phase_bin(), cscripts.csphagen.csphagen._process_observation(), cscripts.csspec.csspec._select_obs(), cscripts.csspec.csspec._set_ebounds(), cscripts.cssens.cssens._set_obs_ebounds(), cscripts.csspec.csspec._set_replace_src_spectrum_by_bins(), cscripts.csspec.csspec._set_replace_src_spectrum_by_nodes(), cscripts.cssens.cssens._set_source(), cscripts.cssens.cssens._set_src_prefactor(), cscripts.cstsdist.cstsdist._sim(), cscripts.cssens.cssens._sim_evt_excess(), cscripts.cslightcrv.cslightcrv._timebin(), cscripts.cspull.cspull._trial(), cscripts.csresmap.csresmap.models(), cscripts.cstsdist.cstsdist.models(), cscripts.cspull.cspull.models(), cscripts.cslightcrv.cslightcrv.models(), cscripts.csspec.csspec.models(), cscripts.csobsinfo.csobsinfo.process(), cscripts.cstsmapsplit.cstsmapsplit.process(), cscripts.csresmap.csresmap.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.csebins.csebins.process(), cscripts.csobsselect.csobsselect.process(), cscripts.cstsdist.cstsdist.process(), cscripts.cspull.cspull.process(), cscripts.csbkgmodel.csbkgmodel.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csresspec.csresspec.process(), cscripts.csscs.csscs.process(), cscripts.csphagen.csphagen.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), cscripts.csobsselect.csobsselect.save(), and cscripts.csphagen.csphagen.save().

def cscripts.csobsdef.csobsdef.pntdef (   self,
  csv 
)
Set pointing definition from a CSV table

Parameters
----------
csv : `~gammalib.GCsv`
    Comma-separated values table

Definition at line 386 of file csobsdef.py.

References cscripts.csobsdef.csobsdef._pntdef.

def cscripts.csobsdef.csobsdef.save (   self)
Save observation definition XML file.

Definition at line 353 of file csobsdef.py.

Member Data Documentation

cscripts.csobsdef.csobsdef._obs
private

Definition at line 92 of file csobsdef.py.

Referenced by cscripts.csobsdef.csobsdef.obs().

cscripts.csobsdef.csobsdef._pntdef
private
cscripts.csobsdef.csobsdef._tmin
private

Definition at line 94 of file csobsdef.py.

Referenced by cscripts.csobsdef.csobsdef.process().


The documentation for this class was generated from the following file: