Пример #1
0
    def __init__(self, sky_catalog, pointing, orientation):
        ''' This class generates a Camera Catalog object, which is just the
        Survey Catalog transfered into focal plane coordinates with the given
        telescope pointing and orientation information.

        Input
        -----
        sky_catalog             :       object
            The sky catalog
        pointing                :       numpy array [alpha, beta]
            The telescope pointing coordinates in degrees
        orientation             :       float
            The telescope orientation in degrees
        '''

        self.k = sky_catalog.k
        self.mag = sky_catalog.mag
        self.alpha = sky_catalog.alpha
        self.beta = sky_catalog.beta
        self.is_in_analysis_region = sky_catalog.is_in_analysis_region
        self.x, self.y = \
            transformations.sky2fp(sky_catalog.alpha, sky_catalog.beta,\
                                                        pointing, orientation)
        self.size = sky_catalog.size
        self.flux = transformations.mag2flux(self.mag)
Пример #2
0
    def __init__(self, sky_catalog, pointing, orientation):
        ''' This class generates a Camera Catalog object, which is just the
        Survey Catalog transfered into focal plane coordinates with the given
        telescope pointing and orientation information.

        Input
        -----
        sky_catalog             :       object
            The sky catalog
        pointing                :       numpy array [alpha, beta]
            The telescope pointing coordinates in degrees
        orientation             :       float
            The telescope orientation in degrees
        '''

        self.k = sky_catalog.k
        self.mag = sky_catalog.mag
        self.alpha = sky_catalog.alpha
        self.beta = sky_catalog.beta
        self.is_in_analysis_region = sky_catalog.is_in_analysis_region
        self.x, self.y = \
            transformations.sky2fp(sky_catalog.alpha, sky_catalog.beta,\
                                                        pointing, orientation)
        self.size = sky_catalog.size
        self.flux = transformations.mag2flux(self.mag)
Пример #3
0
    def __init__(self, sky_limits, density_of_stars, m_min, m_max, A,
                 analysis_limits):
        ''' This class generates the Source Catalog object

        Input
        -----
        sky_limits          :   float array
            The area of sky to generate sources in
            [alpha_min, alpha_max, beta_min, beta_max]
        density_of_stars    :   int
            The maximum number of sources (all magnitude) per unit area
            to generate for the self-calibration simulations
        m_min               :   float
            The saturation limit of the simulated imager
        m_max               :   float
            The 10-sigma detection limit of the simulated imager
        A                   :   numpy array
            The parameters describing the magnitude distribution of the sources
            in the sky, according to: log10(dN/dm) = A + B * mag + C * mag ** 2
        analysis_limits     :   list
            Sky region for rms calculation.

        '''

        area = (sky_limits[1] - sky_limits[0]) \
                                    * (sky_limits[3] - sky_limits[2])
        self.size = int(density_of_stars * area)
        self.k = np.arange(self.size).astype(int)
        self.alpha = np.random.uniform(low=sky_limits[0], \
                        high=sky_limits[1], size=self.size)
        self.beta = np.random.uniform(low=sky_limits[2], \
                        high=sky_limits[3], size=self.size)
        self.mag = self.generate_magnitudes(m_min, m_max, A, area, self.size)
        self.flux = transformations.mag2flux(self.mag)
        self.is_in_analysis_region = (
            (self.alpha > analysis_limits[0]) *
            (self.alpha < analysis_limits[1]) *
            (self.beta > analysis_limits[2]) *
            (self.beta < analysis_limits[3])).astype(bool)
Пример #4
0
    def __init__(self, sky_limits, density_of_stars,
                                            m_min, m_max, A, analysis_limits):
        ''' This class generates the Source Catalog object

        Input
        -----
        sky_limits          :   float array
            The area of sky to generate sources in
            [alpha_min, alpha_max, beta_min, beta_max]
        density_of_stars    :   int
            The maximum number of sources (all magnitude) per unit area
            to generate for the self-calibration simulations
        m_min               :   float
            The saturation limit of the simulated imager
        m_max               :   float
            The 10-sigma detection limit of the simulated imager
        A                   :   numpy array
            The parameters describing the magnitude distribution of the sources
            in the sky, according to: log10(dN/dm) = A + B * mag + C * mag ** 2
        analysis_limits     :   list
            Sky region for rms calculation.

        '''

        area = (sky_limits[1] - sky_limits[0]) \
                                    * (sky_limits[3] - sky_limits[2])
        self.size = int(density_of_stars * area)
        self.k = np.arange(self.size).astype(int)
        self.alpha = np.random.uniform(low=sky_limits[0], \
                        high=sky_limits[1], size=self.size)
        self.beta = np.random.uniform(low=sky_limits[2], \
                        high=sky_limits[3], size=self.size)
        self.mag = self.generate_magnitudes(m_min, m_max, A, area, self.size)
        self.flux = transformations.mag2flux(self.mag)
        self.is_in_analysis_region = ((self.alpha > analysis_limits[0])
                                    * (self.alpha < analysis_limits[1])
                                    * (self.beta > analysis_limits[2])
                                    * (self.beta < analysis_limits[3])).astype(bool)