Пример #1
0
    def quadrant(
        cls,
        array_electrons,
        roe_corner,
        use_flipud,
        header=None,
        bias_subtract_via_prescan=False,
        bias=None,
    ):
        """
        Use an input array of the left quadrant in electrons and perform the rotations required to give correct
        arctic clocking.

        See the docstring of the `FrameACS` class for a complete description of the Euclid FPA, quadrants and
        rotations.
        """

        array_electrons = layout_util.rotate_array_from_roe_corner(
            array=array_electrons, roe_corner=roe_corner)

        if use_flipud:
            array_electrons = np.flipud(array_electrons)

        if bias_subtract_via_prescan:

            bias_serial_prescan_value = prescan_fitted_bias_column(
                array_electrons[:, 18:24])

            array_electrons -= bias_serial_prescan_value

            header.bias_serial_prescan_column = bias_serial_prescan_value

        if bias is not None:

            bias = layout_util.rotate_array_from_roe_corner(
                array=bias, roe_corner=roe_corner)

            if use_flipud:
                bias = np.flipud(bias)

            array_electrons -= bias

            header.bias = Array2DACS.manual_native(array=bias,
                                                   pixel_scales=0.05)

        return cls.manual(array=array_electrons,
                          header=header,
                          pixel_scales=0.05)
Пример #2
0
    def bottom_right(cls, array_electrons):
        """
        Use an input array of a Euclid quadrant corresponding to the bottom-right of a Euclid CCD and rotate the
        quadrant to the correct orientation for arCTIc clocking.

        See the docstring of the `Array2DEuclid` class for a complete description of the Euclid FPA, quadrants and
        rotations.
        """

        array_electrons = layout_util.rotate_array_from_roe_corner(
            array=array_electrons, roe_corner=(1, 1))

        return cls.manual(array=array_electrons, pixel_scales=0.1)
Пример #3
0
def quadrant_convert_to_original(quadrant,
                                 roe_corner,
                                 use_flipud=False,
                                 use_calibrated_gain=True):

    if quadrant.header.bias is not None:
        quadrant += quadrant.header.bias.native

    if quadrant.header.bias_serial_prescan_column is not None:
        quadrant += quadrant.header.bias_serial_prescan_column

    if use_calibrated_gain:
        quadrant /= quadrant.header.calibrated_gain
    else:
        quadrant /= quadrant.header.gain

    quadrant = quadrant.header.array_from_electrons_to_original(array=quadrant)

    if use_flipud:
        quadrant = np.flipud(quadrant.native)

    return layout_util.rotate_array_from_roe_corner(array=quadrant.native,
                                                    roe_corner=roe_corner)
Пример #4
0
 def original_orientation_from(self, array):
     return layout_util.rotate_array_from_roe_corner(
         array=array, roe_corner=self.original_roe_corner
     )
Пример #5
0
 def original_orientation(self):
     return layout_util.rotate_array_from_roe_corner(
         array=self, roe_corner=self.header.original_roe_corner)