def update_state(self, mystate): """Standard function to update our state""" mystate('filename_real', []) mystate('filename_imag', []) mystate('spline_order', 3) mystate('normalize', False) mystate('ampl_interpolation', False) mystate('verbose', 0) mystate('l_axis', "L") mystate('m_axis', "M") mystate('l_beam_offset', 0.0) mystate('m_beam_offset', 0.0) mystate('missing_is_null', False) # Check filename arguments, and init _vb_key for init_voltage_beams() below # We may be created with a single filename pair (scalar Jones term), or 4 filenames (full 2x2 matrix) if isinstance(self.filename_real, str) and isinstance( self.filename_imag, str): self._vb_key = ((self.filename_real, self.filename_imag), ) elif len(self.filename_real) == 4 and len(self.filename_imag) == 4: self._vb_key = tuple(zip(self.filename_real, self.filename_imag)) else: raise ValueError, "filename_real/filename_imag: either a single filename, or a list of 4 filenames expected" # other init mequtils.add_axis('l') mequtils.add_axis('m') self._freqaxis = mequtils.get_axis_number("freq") _verbosity.set_verbose(self.verbose)
def update_state (self,mystate): """Standard function to update our state"""; mystate('filename_real',[]); mystate('filename_imag',[]); mystate('spline_order',3); mystate('normalize',False); mystate('ampl_interpolation',False); mystate('verbose',0); mystate('l_axis',"L") mystate('m_axis',"M") mystate('l_beam_offset',0.0); mystate('m_beam_offset',0.0); mystate('missing_is_null',False); # Check filename arguments, and init _vb_key for init_voltage_beams() below # We may be created with a single filename pair (scalar Jones term), or 4 filenames (full 2x2 matrix) if isinstance(self.filename_real,str) and isinstance(self.filename_imag,str): self._vb_key = ((self.filename_real,self.filename_imag),); elif len(self.filename_real) == 4 and len(self.filename_imag) == 4: self._vb_key = tuple(zip(self.filename_real,self.filename_imag)); else: raise ValueError,"filename_real/filename_imag: either a single filename, or a list of 4 filenames expected"; # other init mequtils.add_axis('l'); mequtils.add_axis('m'); self._freqaxis = mequtils.get_axis_number("freq"); _verbosity.set_verbose(self.verbose);
def update_state (self,mystate): # mystate does some magic to map fields from the node constructor into # fields in 'self' mystate('domain_l',[0,1]); mystate('domain_m',[0,1]); mystate('num_l',5); mystate('num_m',5); mequtils.add_axis('l'); mequtils.add_axis('m');
def update_state(self, mystate): # mystate does some magic to map fields from the node constructor into # fields in 'self' mystate('domain_l', [0, 1]) mystate('domain_m', [0, 1]) mystate('num_l', 5) mystate('num_m', 5) mequtils.add_axis('l') mequtils.add_axis('m')
def update_state(self, mystate): """Standard function to update our state""" mystate('filename', []) mystate('spline_order', 3) mystate('hier_interpol', True) mystate('interpol_lm', True) mystate('l_0', 0.0) mystate('m_0', 0.0) mystate('verbose', 0) mystate('missing_is_null', False) mystate('beam_symmetry', None) mystate('normalization_factor', 1) mystate('rotate_xy', True) # other init mequtils.add_axis('l') mequtils.add_axis('m') self._freqaxis = mequtils.get_axis_number("freq") _verbosity.set_verbose(self.verbose)
def update_state (self,mystate): """Standard function to update our state"""; mystate('filename',[]); mystate('spline_order',3); mystate('hier_interpol',True); mystate('interpol_lm',True); mystate('l_0',0.0); mystate('m_0',0.0); mystate('verbose',0); mystate('missing_is_null',False); mystate('beam_symmetry',None); mystate('normalization_factor',1); mystate('rotate_xy',True); # other init mequtils.add_axis('l'); mequtils.add_axis('m'); self._freqaxis = mequtils.get_axis_number("freq"); _verbosity.set_verbose(self.verbose);
def update_state (self,mystate): """Standard function to update our state"""; mystate('filename_real',[]); mystate('filename_imag',[]); mystate('spline_order',3); mystate('normalize',False); mystate('ampl_interpolation',False); mystate('l_0',0.0); mystate('m_0',0.0); mystate('verbose',0); mystate('missing_is_null',False); # Check filename arguments: we must be created with two identical-length lists if isinstance(self.filename_real,(list,tuple)) and isinstance(self.filename_imag,(list,tuple)) \ and len(self.filename_real) == len(self.filename_imag) and not len(self.filename_real)%1: self._vb_key = tuple(zip(self.filename_real,self.filename_imag)); else: raise ValueError,"filename_real/filename_imag: two lists of filenames of 2N elements each expected"; # other init mequtils.add_axis('l'); mequtils.add_axis('m'); self._freqaxis = mequtils.get_axis_number("freq"); _verbosity.set_verbose(self.verbose);
def update_state(self, mystate): """Standard function to update our state""" mystate('filename_real', []) mystate('filename_imag', []) mystate('spline_order', 3) mystate('normalize', False) mystate('ampl_interpolation', False) mystate('l_0', 0.0) mystate('m_0', 0.0) mystate('verbose', 0) mystate('missing_is_null', False) # Check filename arguments: we must be created with two identical-length lists if isinstance(self.filename_real,(list,tuple)) and isinstance(self.filename_imag,(list,tuple)) \ and len(self.filename_real) == len(self.filename_imag) and not len(self.filename_real)%1: self._vb_key = tuple(zip(self.filename_real, self.filename_imag)) else: raise ValueError, "filename_real/filename_imag: two lists of filenames of 2N elements each expected" # other init mequtils.add_axis('l') mequtils.add_axis('m') self._freqaxis = mequtils.get_axis_number("freq") _verbosity.set_verbose(self.verbose)