def __init__(self, cube, beam=None, mask=None, method="MAD", compute=True): # Initialize cube object self.cube = SpectralCube.read(cube) if mask is not None: _check_mask(mask) self.mask = mask if beam is not None: _check_beam(mask) # Initialize noise object self.noise = Noise(self.cube, beam=beam, method=method)
def __init__(self, cube, mask=None, algorithm=None, beam=None): super(ObsCube, self).__init__() self.cube = sc.SpectralCube.read(cube) self.algorithm = algorithm # Make sure mask is an accepted type if mask is not None: _check_mask(mask) self.mask = mask if beam is not None: _check_beam(beam) self.noise = Noise(self.cube, beam=beam)
def __init__(self, cube, mask=None, algorithm=None, beam=None): raise NotImplementedError("ObsCube is not yet implemented for " "general use.") super(ObsCube, self).__init__() self.cube = SpectralCube.read(cube) self.algorithm = algorithm # Make sure mask is an accepted type if mask is not None: _check_mask(mask) self.mask = mask if beam is not None: _check_beam(beam) self.noise = Noise(self.cube, beam=beam)
def _update(self, data=None, wcs=None, beam=None, method="MAD"): ''' Helper function to update classes. ''' # Check if we need a new SpectralCube if data is None and wcs is None: pass else: if data is None: data = self.cube.unmasked_data[:] if wcs is None: wcs = self.cube.wcs # Make new SpectralCube object self.cube = SpectralCube(data=data, wcs=wcs) if beam is not None: _check_beam(beam) self.noise = Noise(self.cube, beam=beam, method=method)
def __init__(self, cube, beam=None, mask=None, method="MAD", compute=True): raise NotImplementedError("SimCube is not yet implemented for " "general use.") # Initialize cube object self.cube = SpectralCube.read(cube) if mask is not None: _check_mask(mask) self.mask = mask if beam is not None: _check_beam(mask) # Initialize noise object self.noise = Noise(self.cube, beam=beam, method=method)