def get_operator(self): """ Return the operator of the acquisition. Note that the operator is only linear if the scene temperature is differential (absolute=False). """ distribution = self.get_distribution_operator() temp = self.get_unit_conversion_operator() aperture = self.get_aperture_integration_operator() filter = self.get_filter_operator() projection = self.get_projection_operator() hwp = self.get_hwp_operator() polarizer = self.get_polarizer_operator() integ = self.get_detector_integration_operator() trans_inst = self.instrument.get_transmission_operator() trans_atm = self.scene.atmosphere.transmission response = self.get_detector_response_operator() with rule_manager(inplace=True): H = CompositionOperator([ response, trans_inst, integ, polarizer, hwp * projection, filter, aperture, trans_atm, temp, distribution ]) if self.scene == 'QU': H = self.get_subtract_grid_operator()(H) return H
def get_operator(self): """ Return the operator of the acquisition. Note that the operator is only linear if the scene temperature is differential (absolute=False). """ distribution = self.get_distribution_operator() temp = self.get_unit_conversion_operator() aperture = self.get_aperture_integration_operator() filter = self.get_filter_operator() projection = self.get_projection_operator() hwp = self.get_hwp_operator() polarizer = self.get_polarizer_operator() integ = self.get_detector_integration_operator() trans_inst = self.instrument.get_transmission_operator() trans_atm = self.scene.atmosphere.transmission response = self.get_detector_response_operator() with rule_manager(inplace=True): H = CompositionOperator([ response, trans_inst, integ, polarizer, hwp * projection, filter, aperture, trans_atm, temp, distribution]) if self.scene == 'QU': H = self.get_subtract_grid_operator()(H) return H
def func(op1, op2): op = op1(op2) attr = {} attr.update(op2.attrout) attr.update(op1.attrout) assert_equal(op.attrout, attr) assert_is(op.classout, op1.classout) if op1.flags.linear: assert_is_type(op, ZeroOperator) assert_same(op.todense(shapein=3, shapeout=4), np.zeros((4, 3))) return if op1.flags.shape_output == 'unconstrained' or \ op1.flags.shape_input != 'explicit' and \ op2.flags.shape_output != 'explicit': assert_is_type(op, CompositionOperator) else: assert_is_type(op, ConstantOperator) if op1.flags.shape_input == 'unconstrained' and \ op2.flags.shape_output == 'unconstrained': return with rule_manager(none=True): op_ref = op1(op2) assert_same(op.todense(shapein=3, shapeout=4), op_ref.todense(shapein=3, shapeout=4))
def cartesian_horizontal2instrument(self): """ Return the galactic-to-instrument transform. """ time = self.date_obs + TimeDelta(self.time, format='sec') with rule_manager(none=False): r = Rotation3dOperator("ZY'Z''", self.azimuth, 90 - self.elevation, self.pitch, degrees=True).T return r
def func(cls): if cls in (BlockColumnOperator, BlockDiagonalOperator): keywords = {'axisout': 0} elif cls is BlockRowOperator: keywords = {'axisin': 0} else: keywords = {} op = cls([Op1(), Op2()], **keywords) assert_equal(op.nbytes, 12) with rule_manager(none=True): op = cls([op, Op1(), Op2()], **keywords) assert_equal(op.nbytes, 24)
def cartesian_galactic2instrument(self): """ Return the galactic-to-instrument transform. """ time = self.date_obs + TimeDelta(self.time, format='sec') with rule_manager(none=False): r = Rotation3dOperator("ZY'Z''", self.azimuth, 90 - self.elevation, self.pitch, degrees=True).T * \ CartesianEquatorial2HorizontalOperator( 'NE', time, self.latitude, self.longitude) * \ CartesianGalactic2EquatorialOperator() return r
def get_operator(self): """ Return the operator of the acquisition. """ projection = self.get_projection_operator() hwp = self.get_hwp_operator() polarizer = self.get_polarizer_operator() response = self.get_detector_response_operator() distribution = self.get_distribution_operator() with rule_manager(inplace=True): H = response * polarizer * (hwp * projection) * distribution if self.scene == 'QU': H = self.get_subtract_grid_operator() * H return H