Пример #1
0
    def obsdata(self,
                ra,
                dec,
                rf,
                bw,
                tint,
                tadv,
                tstart,
                tstop,
                mjd=MJD_DEFAULT,
                timetype='UTC',
                elevmin=ELEV_LOW,
                elevmax=ELEV_HIGH,
                tau=TAUDEF):
        """Generate u,v points and baseline uncertainties.

           Args:
               ra (float): the source right ascension in fractional hours
               dec (float): the source declination in fractional degrees
               tint (float): the scan integration time in seconds
               tadv (float): the uniform cadence between scans in seconds
               tstart (float): the start time of the observation in hours
               tstop (float): the end time of the observation in hours
               mjd (int): the mjd of the observation
               timetype (str): how to interpret tstart and tstop; either 'GMST' or 'UTC'
               elevmin (float): station minimum elevation in degrees
               elevmax (float): station maximum elevation in degrees
               tau (float): the base opacity at all sites, or a dict giving one opacity per site

           Returns:
               Obsdata: an observation object with no data

        """

        obsarr = simobs.make_uvpoints(self,
                                      ra,
                                      dec,
                                      rf,
                                      bw,
                                      tint,
                                      tadv,
                                      tstart,
                                      tstop,
                                      mjd=mjd,
                                      tau=tau,
                                      elevmin=elevmin,
                                      elevmax=elevmax,
                                      timetype=timetype)

        obs = ehtim.obsdata.Obsdata(ra,
                                    dec,
                                    rf,
                                    bw,
                                    obsarr,
                                    self.tarr,
                                    source=str(ra) + ":" + str(dec),
                                    mjd=mjd,
                                    timetype=timetype)
        return obs
Пример #2
0
    def obsdata(self,
                ra,
                dec,
                rf,
                bw,
                tint,
                tadv,
                tstart,
                tstop,
                mjd=MJD_DEFAULT,
                timetype='UTC',
                polrep='stokes',
                elevmin=ELEV_LOW,
                elevmax=ELEV_HIGH,
                tau=TAUDEF,
                fix_theta_GMST=False):
        """Generate u,v points and baseline uncertainties.

           Args:
               ra (float): the source right ascension in fractional hours
               dec (float): the source declination in fractional degrees
               tint (float): the scan integration time in seconds
               tadv (float): the uniform cadence between scans in seconds
               tstart (float): the start time of the observation in hours
               tstop (float): the end time of the observation in hours
               mjd (int): the mjd of the observation
               timetype (str): how to interpret tstart and tstop; either 'GMST' or 'UTC'
               polrep (str): polarization representation, either 'stokes' or 'circ'
               elevmin (float): station minimum elevation in degrees
               elevmax (float): station maximum elevation in degrees
               tau (float): the base opacity at all sites, or a dict giving one opacity per site

           Returns:
               Obsdata: an observation object with no data

        """

        obsarr = simobs.make_uvpoints(self,
                                      ra,
                                      dec,
                                      rf,
                                      bw,
                                      tint,
                                      tadv,
                                      tstart,
                                      tstop,
                                      mjd=mjd,
                                      polrep=polrep,
                                      tau=tau,
                                      elevmin=elevmin,
                                      elevmax=elevmax,
                                      timetype=timetype,
                                      fix_theta_GMST=fix_theta_GMST)

        uniquetimes = np.sort(np.unique(obsarr['time']))
        scans = np.array([[time - 0.5 * tadv, time + 0.5 * tadv]
                          for time in uniquetimes])
        source = str(ra) + ":" + str(dec)
        obs = ehtim.obsdata.Obsdata(ra,
                                    dec,
                                    rf,
                                    bw,
                                    obsarr,
                                    self.tarr,
                                    source=source,
                                    mjd=mjd,
                                    timetype=timetype,
                                    polrep=polrep,
                                    ampcal=True,
                                    phasecal=True,
                                    opacitycal=True,
                                    dcal=True,
                                    frcal=True,
                                    scantable=scans)
        return obs