ctools 2.1.0.dev
Loading...
Searching...
No Matches
cscripts.csviscube.csviscube Class Reference
Inheritance diagram for cscripts.csviscube.csviscube:

Public Member Functions

 __init__ (self, *argv)
 
 process (self)
 
 save (self)
 
 publish (self, name='')
 

Protected Member Functions

 _get_parameters (self)
 
 _zenith_angle_map (self, nx, ny, dx, dy)
 
 _sun_ra_exclusion (self, time)
 
 _moon_ra_exclusion (self, time)
 
 _adjust_ra_interval (self, ra_start, ra_stop)
 
 _exclude_ra_interval (self, hours, ra_start, ra_stop)
 
 _hour_angle_weight (self)
 
 _visibility_cube (self)
 
 _save_results (self, outfile, clobber)
 

Protected Attributes

 _cube
 
 _results
 

Detailed Description

Compute a visibility cube

Definition at line 30 of file csviscube.py.

Constructor & Destructor Documentation

◆ __init__()

cscripts.csviscube.csviscube.__init__ ( self,
* argv )
Constructor

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

Raises
------
TypeError
    An invalid number of command line arguments was provided.

Definition at line 36 of file csviscube.py.

Member Function Documentation

◆ _adjust_ra_interval()

cscripts.csviscube.csviscube._adjust_ra_interval ( self,
ra_start,
ra_stop )
protected
Adjust Right Ascension interval so that it overlaps with the [0,360[
interval

Parameters
----------
ra_start : float
    Start of interval to exclude (degrees)
ra_stop : float
    Stop of interval to exclude (degrees)

Returns
-------
ra_start : float
    Adjusted start of interval to exclude (degrees)
ra_stop : float
    Adjusted stop of interval to exclude (degrees)

Definition at line 247 of file csviscube.py.

Referenced by cscripts.csviscube.csviscube._exclude_ra_interval(), and cscripts.csviscube.csviscube._hour_angle_weight().

◆ _exclude_ra_interval()

cscripts.csviscube.csviscube._exclude_ra_interval ( self,
hours,
ra_start,
ra_stop )
protected
Exclude Right Ascension interval from array of hour angles

Parameters
----------
hours : list of floats
    Array of hours
ra_start : float
    Start of interval to exclude (degrees)
ra_stop : float
    Stop of interval to exclude (degrees)

Returns
-------
hours : list of floats
    Array of hours with excluded Right Ascension interval

Definition at line 280 of file csviscube.py.

References cscripts.csviscube.csviscube._adjust_ra_interval().

Referenced by cscripts.csviscube.csviscube._hour_angle_weight().

◆ _get_parameters()

◆ _hour_angle_weight()

cscripts.csviscube.csviscube._hour_angle_weight ( self)
protected
Compute hour angle weights

Computes an array that specifies the time during which a given hour
angle was observed during the observing time interval [tmin,tmax].
The hour angle runs from 0 to 360 degrees, array values are in units
of hours.

The method loops over the days in the time interval [tmin,tmax], with
time = tmin + i*86400 seconds. At each time step the position in Right
Ascension and Declination of the Sun is computed (the Sun's
Declination is in fact not used here).

An interval of [ra_sun-dra_sun, ra_sun+dra_sun] is assumed to be the
day. The method _sun_ra_exclusion() is used to compute dra_sun, which
is half of the length of the day in degrees (recall that 15 degrees
is one hour). The length of the day is computed using the sunzenith
constraint.

Definition at line 338 of file csviscube.py.

References cscripts.csviscube.csviscube._adjust_ra_interval(), cscripts.csviscube.csviscube._exclude_ra_interval(), cscripts.csviscube.csviscube._moon_ra_exclusion(), cscripts.csviscube.csviscube._results, and cscripts.csviscube.csviscube._sun_ra_exclusion().

Referenced by cscripts.csviscube.csviscube._visibility_cube().

◆ _moon_ra_exclusion()

cscripts.csviscube.csviscube._moon_ra_exclusion ( self,
time )
protected
Compute the half length of the Right Ascension interval to exclude due
to the Moon constraint

The Moon zenith angle constraint implies an interval in Right Ascension
that is to be excluded. This method computes half the length of this
interval.

Parameters
----------
time : `~gammalib.GTime()`
    Time for which the Moon exclusion is to be computed

Returns
-------
dra : float
    Right Ascension interval half length (degrees)

Definition at line 198 of file csviscube.py.

Referenced by cscripts.csviscube.csviscube._hour_angle_weight().

◆ _save_results()

cscripts.csviscube.csviscube._save_results ( self,
outfile,
clobber )
protected
Save results in VISIBILITY FITS table

Parameters
----------
outfile : str
    Result FITS file name
clobber : bool
    Overwrite existing file?

Definition at line 545 of file csviscube.py.

References cscripts.csviscube.csviscube._results.

Referenced by cscripts.csviscube.csviscube.save().

◆ _sun_ra_exclusion()

cscripts.csviscube.csviscube._sun_ra_exclusion ( self,
time )
protected
Compute the half length of the Right Ascension interval to exclude due
to the Sun constraint

The Sun zenith angle constraint implies an interval in Right Ascension
that is to be excluded (that's the interval during which it is day).
This method computes half the length of this interval in degrees.

Parameters
----------
time : `~gammalib.GTime()`
    Time for which the Sun exclusion is to be computed

Returns
-------
dra : float
    Right Ascension interval half length (degrees)

Definition at line 149 of file csviscube.py.

Referenced by cscripts.csviscube.csviscube._hour_angle_weight().

◆ _visibility_cube()

cscripts.csviscube.csviscube._visibility_cube ( self)
protected
Compute visibility cube

Compute visibility cube by displacing the zenith angle map for all
hour angles. The visibility cube contains the number of hours a given
celestial position is visible under a given zenith angle interval.
Summing over all zenith angle intervals specifies for how long a given
celestial position will be visible.

Definition at line 477 of file csviscube.py.

References cscripts.csviscube.csviscube._cube, cscripts.csviscube.csviscube._hour_angle_weight(), and cscripts.csviscube.csviscube._zenith_angle_map().

Referenced by cscripts.csviscube.csviscube.process().

◆ _zenith_angle_map()

cscripts.csviscube.csviscube._zenith_angle_map ( self,
nx,
ny,
dx,
dy )
protected
Compute zenith angle map

The zenith angle of a position (ra,dec) depends on the declination and
the hour angle h and is given by

zenith(h,dec) = arccos( sin(lat) * sin(dec) + cos(lat) * cos(dec) * cos(h) )

The hour angle h (or local hour angle, LHA) is defined as the difference
between local siderial time (LST) and the Right Ascension

h = LST - ra

The map is computed for h=-ra which is equivalent to GST=lon (or LST=0).
In other words, the map corresponds to the time when ra=0 passes through
the local meridian.

Parameters
----------
nx : int
    Number of Right Ascension pixels.
ny : int
    Number of Declination pixels.
dx : float
    Right Ascension pixel size in degrees.
dy : float
    Declination pixel size in degrees.

Returns
-------
zmap : `~gammalib.GSkyMap`
    Allsky map comprising the zenith angle for an hour angle of 0.

Definition at line 81 of file csviscube.py.

Referenced by cscripts.csviscube.csviscube._visibility_cube().

◆ process()

cscripts.csviscube.csviscube.process ( self)
Process the script

Definition at line 634 of file csviscube.py.

References cscripts.csadd2caldb.csadd2caldb._get_parameters(), cscripts.csbkgmodel.csbkgmodel._get_parameters(), cscripts.cscaldb.cscaldb._get_parameters(), cscripts.csebins.csebins._get_parameters(), cscripts.csfindobs.csfindobs._get_parameters(), cscripts.csfootprint.csfootprint._get_parameters(), cscripts.csiactcopy.csiactcopy._get_parameters(), cscripts.csiactdata.csiactdata._get_parameters(), cscripts.csiactobs.csiactobs._get_parameters(), cscripts.cslightcrv.cslightcrv._get_parameters(), cscripts.csmodelinfo.csmodelinfo._get_parameters(), cscripts.csmodelmerge.csmodelmerge._get_parameters(), cscripts.csmodelselect.csmodelselect._get_parameters(), cscripts.csmodelsois.csmodelsois._get_parameters(), cscripts.csobs2caldb.csobs2caldb._get_parameters(), cscripts.csobsdef.csobsdef._get_parameters(), cscripts.csobsinfo.csobsinfo._get_parameters(), cscripts.csobsselect.csobsselect._get_parameters(), cscripts.csphagen.csphagen._get_parameters(), cscripts.csphasecrv.csphasecrv._get_parameters(), cscripts.cspull.cspull._get_parameters(), cscripts.csresmap.csresmap._get_parameters(), cscripts.csresspec.csresspec._get_parameters(), cscripts.csroot2caldb.csroot2caldb._get_parameters(), cscripts.csscs.csscs._get_parameters(), cscripts.cssens.cssens._get_parameters(), cscripts.csspec.csspec._get_parameters(), cscripts.cssrcdetect.cssrcdetect._get_parameters(), cscripts.cstsdist.cstsdist._get_parameters(), cscripts.cstsmapmerge.cstsmapmerge._get_parameters(), cscripts.cstsmapsplit.cstsmapsplit._get_parameters(), cscripts.csviscube.csviscube._get_parameters(), cscripts.csworkflow.csworkflow._get_parameters(), cscripts.csviscube.csviscube._visibility_cube(), cscripts.cslightcrv.cslightcrv.publish(), cscripts.csphasecrv.csphasecrv.publish(), cscripts.csresmap.csresmap.publish(), cscripts.csspec.csspec.publish(), cscripts.csviscube.csviscube.publish(), ctbin.publish(), ctbkgcube.publish(), ctcubemask.publish(), ctexpcube.publish(), ctmapcube.publish(), ctmodel.publish(), ctobssim.publish(), ctphase.publish(), ctprob.publish(), ctselect.publish(), ctskymap.publish(), and cttsmap.publish().

◆ publish()

cscripts.csviscube.csviscube.publish ( self,
name = '' )

◆ save()

cscripts.csviscube.csviscube.save ( self)

Member Data Documentation

◆ _cube

cscripts.csviscube.csviscube._cube
protected

◆ _results

cscripts.csviscube.csviscube._results
protected

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