Esempio n. 1
0
    def set_obs(self):
        """
        Returns an observation container with a set of CTA observations.
        
        Keywords:
        """

        # Setup observation definition list
        obsdeflist = obsutils.set_obs_patterns(
            self.m_pattern, ra=self["ra"].real(), dec=self["dec"].real(), offset=self["offset"].real()
        )

        # Create list of observations
        obs = obsutils.set_obs_list(
            obsdeflist,
            tstart=self["tmin"].real(),
            duration=self["tmax"].real() - self["tmin"].real(),
            deadc=self["deadc"].real(),
            emin=self["emin"].real(),
            emax=self["emax"].real(),
            rad=self["rad"].real(),
            irf=self["irf"].string(),
            caldb=self["caldb"].string(),
        )

        # Return observation container
        return obs
Esempio n. 2
0
def setup_observations(pattern="four", ra=83.63, dec=22.01, offset=1.5, \
                       emin=0.1, emax=100.0, rad=5.0, duration=1800.0, \
                       deadc=0.95, \
                       caldb="prod2", irf="South_50h"):
    """
    Returns an observation container.
    
    Keywords:
     pattern   - Pointing pattern, either "single" or "four"
     ra        - RA of pattern centre [deg] (default: 83.6331)
     dec       - DEC of pattern centre [deg] (default: 22.0145)
     offset    - Offset between observations of pattern [deg] (default: 1.5)
     emin      - Minimum energy [TeV] (default: 0.1)
     emax      - Maximum energy [TeV] (default: 100.0)
     rad       - ROI radius used for analysis [deg] (default: 5.0)
     duration  - Duration of one CTA observation [seconds] (default: 1800.0)
     deadc     - Deadtime correction factor (default: 0.95)
     caldb     - Calibration database path (default: "dummy")
     irf       - Instrument response function (default: cta_dummy_irf)
    """
    # Set list of observations
    obs_def_list = obsutils.set_obs_patterns(pattern, \
                                             ra=ra, \
                                             dec=dec, \
                                             offset=offset)
    
    # Get observation container
    obs = obsutils.set_obs_list(obs_def_list, \
                                duration=duration, \
                                emin=emin, \
                                emax=emax, \
                                rad=rad, \
                                caldb=caldb, \
                                irf=irf)

    # Return observation container
    return obs