Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
    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)
Esempio n. 4
0
    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)
Esempio n. 5
0
        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)
Esempio n. 6
0
        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)
Esempio n. 7
0
    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)
Esempio n. 8
0
        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)