ctools
2.0.0
|
Public Member Functions | |
def | __init__ |
def | process |
def | save |
def | runlist |
def | ebounds |
def | obs |
Private Member Functions | |
def | _get_parameters |
def | _background_spectrum |
def | _iact_background |
def | _append_inmodels |
def | _write_summary |
def | _get_filename |
def | _is_present |
Generates an IACT observation definition XML file This class implements the creation of a observation xml file for IACT data analysis. This class is dedicated for use inside a IACT Collaboration, i.e. it can only be used if you have access to IACT data in FITS format. The FITS data has to be structured and in the format described here: http://gamma-astro-data-formats.readthedocs.org/en/latest/
Definition at line 31 of file csiactobs.py.
def cscripts.csiactobs.csiactobs.__init__ | ( | self, | |
argv | |||
) |
Constructor
Definition at line 44 of file csiactobs.py.
|
private |
Append input models
Definition at line 428 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs.process().
|
private |
Create a background spectrum model dependent on user parameters Parameters ---------- prefactor : float Power law prefactor of spectral model index : float Power law index of spectral model emin : float Minimum energy (in case a spectral node function is required) emax : float Maximum energy (in case a spectral node function is required) Returns ------- spec : `~gammalib.GModelSpectral()` Spectral model for the background shape
Definition at line 245 of file csiactobs.py.
References cscripts.csiactobs.csiactobs._bkg_range_factor, cscripts.csiactobs.csiactobs._bkgpars, and cscripts.csiactobs.csiactobs._iact_background().
Referenced by cscripts.csiactobs.csiactobs._iact_background().
|
private |
Retrieves a filename from a hdu index Parameters ---------- hdu : `~gammalib.GFitsTable` HDU FITS table hierarchy : list of str List of strings containing the hierarchy how to look for files formats : list of str File formats available for this observation Returns ------- filename : str Filename of requested file
Definition at line 476 of file csiactobs.py.
References cscripts.csiactobs.csiactobs._subdir.
Referenced by cscripts.csiactobs.csiactobs.process().
|
private |
Get parameters from parfile and setup the observation
Definition at line 93 of file csiactobs.py.
References cscripts.csiactobs.csiactobs._aeff_hiera, cscripts.csiactobs.csiactobs._bkg_aeff_index, cscripts.csiactobs.csiactobs._bkg_aeff_norm, cscripts.csiactobs.csiactobs._bkg_gauss_index, cscripts.csiactobs.csiactobs._bkg_gauss_norm, cscripts.csiactobs.csiactobs._bkg_gauss_sigma, cscripts.csiactobs.csiactobs._bkg_hiera, cscripts.csiactobs.csiactobs._bkg_mod_hiera, cscripts.csiactobs.csiactobs._bkg_range_factor, cscripts.csiactobs.csiactobs._bkgpars, cscripts.csfindobs.csfindobs._datapath, cscripts.csiactcopy.csiactcopy._datapath, cscripts.csiactdata.csiactdata._datapath, cscripts.csiactobs.csiactobs._datapath, cscripts.csiactobs.csiactobs._debug, cscripts.csiactobs.csiactobs._edisp_hiera, cscripts.csiactobs.csiactobs._ev_hiera, cscripts.csiactobs.csiactobs._hdu_index, cscripts.csiactdata.csiactdata._master_indx, cscripts.csiactobs.csiactobs._master_indx, cscripts.csfindobs.csfindobs._obs_index, cscripts.csiactobs.csiactobs._obs_index, cscripts.csfindobs.csfindobs._prodname, cscripts.csiactcopy.csiactcopy._prodname, cscripts.csiactobs.csiactobs._prodname, cscripts.csiactobs.csiactobs._psf_hiera, cscripts.csiactcopy.csiactcopy._runlist, cscripts.csiactobs.csiactobs._runlist, cscripts.csiactobs.csiactobs._runlistfile, cscripts.csiactobs.csiactobs._subdir, and cscripts.csiactobs.csiactobs._use_bkg_scale.
Referenced by cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csobsinfo.csobsinfo.process(), cscript_base.cscript_base.process(), cscript_like.cscript_like.process(), cscript_obs.cscript_obs.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.cstsmapsplit.cstsmapsplit.process(), cscripts.csresmap.csresmap.process(), cscripts.csmodelsois.csmodelsois.process(), cscripts.csobsdef.csobsdef.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.cstsmapmerge.cstsmapmerge.process(), cscripts.csobsselect.csobsselect.process(), cscripts.csworkflow.csworkflow.process(), cscripts.csobs2caldb.csobs2caldb.process(), cscripts.cstsdist.cstsdist.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.cspull.cspull.process(), cscripts.csphasecrv.csphasecrv.process(), cscripts.csiactobs.csiactobs.process(), cscripts.cslightcrv.cslightcrv.process(), cscripts.csviscube.csviscube.process(), cscripts.csresspec.csresspec.process(), cscripts.csscs.csscs.process(), cscripts.csphagen.csphagen.process(), cscripts.cssens.cssens.process(), cscripts.csspec.csspec.process(), and cscripts.csroot2caldb.csroot2caldb.process().
|
private |
Create an IACT background model Parameters ---------- telescope : str Name of telescope obs_id : str Observation ID bkg_scale : float Background scaling factor bkgtype : str Type of background (irf,aeff, or gauss) Returns ------- model : `~gammalib.GModelData()` Background model for IACT observation
Definition at line 347 of file csiactobs.py.
References cscripts.csiactobs.csiactobs._background_spectrum(), cscripts.csiactobs.csiactobs._bkg_aeff_index, cscripts.csiactobs.csiactobs._bkg_aeff_norm, cscripts.csiactobs.csiactobs._bkg_gauss_index, cscripts.csiactobs.csiactobs._bkg_gauss_norm, and cscripts.csiactobs.csiactobs._bkg_gauss_sigma.
Referenced by cscripts.csiactobs.csiactobs._background_spectrum(), and cscripts.csiactobs.csiactobs.process().
|
private |
Checks if a filename is present Parameters ---------- filename : str Filename obs_id : int Observation ID filetype : str Type of file Returns ------- present : bool True if filename is present, False otherwise
Definition at line 523 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs.process().
|
private |
Write observation summary
Definition at line 455 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs.process().
def cscripts.csiactobs.csiactobs.ebounds | ( | self | ) |
Return runlist energy boundaries
Definition at line 840 of file csiactobs.py.
References cscripts.csebins.csebins._ebounds, and cscripts.csiactobs.csiactobs._ebounds.
def cscripts.csiactobs.csiactobs.obs | ( | self | ) |
Return observations container
Definition at line 847 of file csiactobs.py.
References cscripts.csbkgmodel.csbkgmodel._models, cscripts.csiactobs.csiactobs._models, cscripts.csiactobs.csiactobs._obs, and cscripts.csiactobs.csiactobs._xml.
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.csiactobs.csiactobs.process | ( | self | ) |
Process the script
Definition at line 566 of file csiactobs.py.
References cscripts.csiactobs.csiactobs._aeff_hiera, cscripts.csiactobs.csiactobs._append_inmodels(), cscripts.csiactobs.csiactobs._bkg_hiera, cscripts.csiactobs.csiactobs._bkg_mod_hiera, cscripts.csiactobs.csiactobs._edisp_hiera, cscripts.csiactobs.csiactobs._ev_hiera, cscripts.csiactobs.csiactobs._get_filename(), cscripts.csadd2caldb.csadd2caldb._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csfindobs.csfindobs._get_parameters(), cscripts.csiactdata.csiactdata._get_parameters(), cscripts.csiactcopy.csiactcopy._get_parameters(), cscripts.cscaldb.cscaldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.csfootprint.csfootprint._get_parameters(), cscripts.csiactobs.csiactobs._get_parameters(), cscripts.csiactobs.csiactobs._hdu_index, cscripts.csiactobs.csiactobs._iact_background(), cscripts.csiactobs.csiactobs._is_present(), cscripts.csfindobs.csfindobs._obs_index, cscripts.csiactobs.csiactobs._obs_index, cscripts.csiactobs.csiactobs._psf_hiera, cscripts.csiactcopy.csiactcopy._runlist, cscripts.csiactobs.csiactobs._runlist, cscripts.csiactobs.csiactobs._use_bkg_scale, and cscripts.csiactobs.csiactobs._write_summary().
def cscripts.csiactobs.csiactobs.runlist | ( | self, | |
runlist | |||
) |
Set runlist Parameters ---------- runlist : list List of observation IDs Raises ------ RuntimeError Input runlist is not a Python list
Definition at line 814 of file csiactobs.py.
References cscripts.csiactcopy.csiactcopy._runlist, and cscripts.csiactobs.csiactobs._runlist.
def cscripts.csiactobs.csiactobs.save | ( | self | ) |
Save observation definition and model definition XML file
Definition at line 786 of file csiactobs.py.
|
private |
Definition at line 64 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 72 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs._iact_background().
|
private |
Definition at line 73 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs._iact_background().
|
private |
Definition at line 70 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs._iact_background().
|
private |
Definition at line 69 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs._iact_background().
|
private |
Definition at line 71 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs._iact_background().
|
private |
Definition at line 66 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 68 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 74 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._background_spectrum(), and cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 60 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._background_spectrum(), and cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 54 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 78 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 53 of file csiactobs.py.
Referenced by cscripts.csphagen.csphagen.__getstate__(), cscripts.csspec.csspec.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.csspec.csspec.__setstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.csspec.csspec._fit_energy_bins(), cscripts.cssens.cssens._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphagen.csphagen._process_observation(), cscripts.csspec.csspec._set_ebounds(), cscripts.csspec.csspec._set_replace_src_spectrum_by_bins(), cscripts.csobsinfo.csobsinfo.ebounds(), cscripts.csiactobs.csiactobs.ebounds(), and cscripts.csobsinfo.csobsinfo.process().
|
private |
Definition at line 67 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 63 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 75 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 61 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 57 of file csiactobs.py.
Referenced by cscripts.csphagen.csphagen.__getstate__(), cscripts.cssens.cssens.__getstate__(), cscripts.cssens.cssens.__setstate__(), cscripts.csphagen.csphagen.__setstate__(), cscripts.cssens.cssens._e_bin(), cscripts.csmodelsois.csmodelsois._gen_cubemodel(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphagen.csphagen._process_observation(), cscripts.csphagen.csphagen._set_models(), cscripts.csmodelsois.csmodelsois.models(), cscripts.cssrcdetect.cssrcdetect.models(), cscripts.csiactobs.csiactobs.obs(), cscripts.csmodelinfo.csmodelinfo.process(), cscripts.csmodelmerge.csmodelmerge.process(), cscripts.csmodelselect.csmodelselect.process(), cscripts.cssrcdetect.cssrcdetect.process(), cscripts.cssens.cssens.process(), cscripts.csmodelsois.csmodelsois.save(), cscripts.csmodelinfo.csmodelinfo.save(), and cscripts.cssrcdetect.cssrcdetect.save().
|
private |
Definition at line 52 of file csiactobs.py.
Referenced by cscripts.csobsdef.csobsdef.obs(), and cscripts.csiactobs.csiactobs.obs().
|
private |
Definition at line 76 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 55 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 65 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 58 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), cscripts.csiactobs.csiactobs.process(), and cscripts.csiactobs.csiactobs.runlist().
|
private |
Definition at line 59 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 77 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_filename(), and cscripts.csiactobs.csiactobs._get_parameters().
|
private |
Definition at line 62 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs._get_parameters(), and cscripts.csiactobs.csiactobs.process().
|
private |
Definition at line 56 of file csiactobs.py.
Referenced by cscripts.csiactobs.csiactobs.obs().
|
private |
Definition at line 86 of file csiactobs.py.