Exemplo n.º 1
0
    def __init__(self, localDir = None, remoteServer="http://archive.stsci.edu"):
        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], '.mastio', 'everest')

        remoteFluxPath = 'missions/hlsp/everest'
        remoteTpfPath = 'NoEverestTpfFiles'  #No TPFs for Everest
        KeplerAbstractClass.__init__(self, localDir, remoteServer, remoteFluxPath, remoteTpfPath)
Exemplo n.º 2
0
    def __init__(self, localDir=None, remoteServer="http://archive.stsci.edu"):
        """Download K2 target pixel files from the MAST archive

        Input args:
        localDir   (str) Where to cache data

        Optional Input Args:
        remoteServer:   (str) If MAST ever change the location of
                        their server, the new url can be passed.

        Usage:
        #Create an archive object
        archive = K2Archive("/large_disk/K2")

        tpf, hdr = archive.getTargetPixelFile(k2id, c, header=True)
        sc = archive.getTargetPixelFile(k2id, c, sc=True)


        Note:
        Only target pixel files are available from MAST at the moment
        The interface is a little different from KeplerArchive()
        """

        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], '.mastio', 'k2')

        remoteFluxPath = 'pub/k2/lightcurves'
        remoteTpfPath = 'pub/k2/target_pixel_files'
        KeplerAbstractClass.__init__(self, localDir, remoteServer, remoteFluxPath, remoteTpfPath)
Exemplo n.º 3
0
    def __init__(self, localDir=None, remoteServer="http://archive.stsci.edu"):
        """Download K2 target pixel files from the MAST archive

        Input args:
        localDir   (str) Where to cache data

        Optional Input Args:
        remoteServer:   (str) If MAST ever change the location of
                        their server, the new url can be passed.

        Usage:
        #Create an archive object
        archive = K2Archive("/large_disk/K2")

        tpf, hdr = archive.getTargetPixelFile(k2id, c, header=True)
        sc = archive.getTargetPixelFile(k2id, c, sc=True)


        Note:
        Only target pixel files are available from MAST at the moment
        The interface is a little different from KeplerArchive()
        """

        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], '.mastio', 'k2')

        remoteFluxPath = 'pub/k2/lightcurves'
        remoteTpfPath = 'pub/k2/target_pixel_files'
        KeplerAbstractClass.__init__(self, localDir, remoteServer,
                                     remoteFluxPath, remoteTpfPath)
Exemplo n.º 4
0
    def __init__(self, localDir=None, remoteServer="http://archive.stsci.edu"):
        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], '.mastio', 'everest')

        remoteFluxPath = 'missions/hlsp/everest'
        remoteTpfPath = 'NoEverestTpfFiles'  #No TPFs for Everest
        KeplerAbstractClass.__init__(self, localDir, remoteServer,
                                     remoteFluxPath, remoteTpfPath)
Exemplo n.º 5
0
    def getFile(self, kepid, campaign, isFluxFile, month=None, *args, **kwargs):
        """See KeplerAbstractClass.getFile()"""

        #Traps the case of attempting to download a lightcurve file for the
        #first three quarters, for which no lightcurve files were created.
        if campaign < 3 and isFluxFile:
            raise ValueError("No lightcurve files were created for Campaigns 0,1 or 2")

        return KeplerAbstractClass.getFile(self, kepid, campaign, isFluxFile,
                                                month, *args, **kwargs)
Exemplo n.º 6
0
    def getFile(self,
                kepid,
                campaign,
                isFluxFile,
                month=None,
                *args,
                **kwargs):
        """See KeplerAbstractClass.getFile()"""

        #Traps the case of attempting to download a lightcurve file for the
        #first three quarters, for which no lightcurve files were created.
        if campaign < 3 and isFluxFile:
            raise ValueError(
                "No lightcurve files were created for Campaigns 0,1 or 2")

        return KeplerAbstractClass.getFile(self, kepid, campaign, isFluxFile,
                                           month, *args, **kwargs)
Exemplo n.º 7
0
    def __init__(self, localDir=None, remoteServer="http://archive.stsci.edu"):
        remoteFluxPath = "pub/kepler/lightcurves"
        remoteTpfPath =  "pub/kepler/target_pixel_files"

        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], ".mastio", "kepler")

        KeplerAbstractClass.__init__(self, localDir, remoteServer, remoteFluxPath, remoteTpfPath)

        self.timeStrs=dict([
            ('0', '2009131105131'), \
            ('1', '2009166043257'), \
            ('2', '2009259160929'), \
            ('3', '2009350155506'), \
            ('4', '2010078095331'), \
            ('5', '2010174085026'), \
            ('6', '2010265121752'), \
            ('7', '2010355172524'), \
            ('8', '2011073133259'), \
            ('9', '2011177032512'), \
            ('10', '2011271113734'), \
            ('11', '2012004120508'), \
            ('12', '2012088054726'), \
            ('13', '2012179063303'), \
            ('14', '2012277125453'), \
            ('15', '2013011073258'), \
            ('16', '2013098041711'), \
            ('17', '2013131215648'), \
        ])

        #Incomplete
        self.shortCadenceTimeStr=dict([
             ('2.1', '2009201121230'), \
             ('2.2', '2009231120729'), \
             ('5.1', '2010111051353'), \
             ('5.2', '2010140023957'), \
             ('5.3', '2010174090439'), \
             ('6.1', '2010203174610'), \
             ('6.2', '2010234115140'), \
             ('6.3', '2010265121752'), \
             ('7.1', '2010296114515'), \
             ('7.2', '2010326094124'), \
             ('7.3', '2010355172524'), \
             ('8.1', '2011024051157'), \
             ('8.2', '2011053090032'), \
             ('8.3', '2011073133259'), \
             ('9.1', '2011116030358'), \
             ('9.2', '2011145075126'), \
             ('9.3', '2011177032512'), \
            ('10.1', '2011208035123'), \
            ('10.2', '2011240104155'), \
            ('10.3', '2011271113734'), \
            ('11.1', '2011303113607'), \
            ('11.2', '2011334093404'), \
            ('11.3', '2012004120508'), \
            ('12.1', '2012032013838'), \
            ('12.2', '2012060035710'), \
            ('12.3', '2012088054726'), \
            ('13.1', '2012121044856'), \
            ('13.2', '2012151031540'), \
            ('13.3', '2012179063303'), \
            ('14.1', '2012211050319'), \
            ('14.2', '2012242122129'), \
            ('14.3', '2012277125453'), \
            ('15.1', '2012310112549'), \
            ('15.2', '2013011073258'), \
            ('15.3', '2012341132017'), \
            ('16.1', '2013017113907'), \
            ('16.2', '2013065031647'), \
            ('16.3', '2013098041711'), \
            ('17.1', '2013121191144'), \
            ('17.2', '2013131215648'), \
                   ] )
Exemplo n.º 8
0
    def __init__(self, localDir=None, remoteServer="http://archive.stsci.edu"):
        remoteFluxPath = "pub/kepler/lightcurves"
        remoteTpfPath = "pub/kepler/target_pixel_files"

        if localDir is None:
            localDir = os.path.join(os.environ['HOME'], ".mastio", "kepler")

        KeplerAbstractClass.__init__(self, localDir, remoteServer,
                                     remoteFluxPath, remoteTpfPath)

        self.timeStrs=dict([
            ('0', '2009131105131'), \
            ('1', '2009166043257'), \
            ('2', '2009259160929'), \
            ('3', '2009350155506'), \
            ('4', '2010078095331'), \
            ('5', '2010174085026'), \
            ('6', '2010265121752'), \
            ('7', '2010355172524'), \
            ('8', '2011073133259'), \
            ('9', '2011177032512'), \
            ('10', '2011271113734'), \
            ('11', '2012004120508'), \
            ('12', '2012088054726'), \
            ('13', '2012179063303'), \
            ('14', '2012277125453'), \
            ('15', '2013011073258'), \
            ('16', '2013098041711'), \
            ('17', '2013131215648'), \
        ])

        #Incomplete
        self.shortCadenceTimeStr=dict([
             ('2.1', '2009201121230'), \
             ('2.2', '2009231120729'), \
             ('5.1', '2010111051353'), \
             ('5.2', '2010140023957'), \
             ('5.3', '2010174090439'), \
             ('6.1', '2010203174610'), \
             ('6.2', '2010234115140'), \
             ('6.3', '2010265121752'), \
             ('7.1', '2010296114515'), \
             ('7.2', '2010326094124'), \
             ('7.3', '2010355172524'), \
             ('8.1', '2011024051157'), \
             ('8.2', '2011053090032'), \
             ('8.3', '2011073133259'), \
             ('9.1', '2011116030358'), \
             ('9.2', '2011145075126'), \
             ('9.3', '2011177032512'), \
            ('10.1', '2011208035123'), \
            ('10.2', '2011240104155'), \
            ('10.3', '2011271113734'), \
            ('11.1', '2011303113607'), \
            ('11.2', '2011334093404'), \
            ('11.3', '2012004120508'), \
            ('12.1', '2012032013838'), \
            ('12.2', '2012060035710'), \
            ('12.3', '2012088054726'), \
            ('13.1', '2012121044856'), \
            ('13.2', '2012151031540'), \
            ('13.3', '2012179063303'), \
            ('14.1', '2012211050319'), \
            ('14.2', '2012242122129'), \
            ('14.3', '2012277125453'), \
            ('15.1', '2012310112549'), \
            ('15.2', '2013011073258'), \
            ('15.3', '2012341132017'), \
            ('16.1', '2013017113907'), \
            ('16.2', '2013065031647'), \
            ('16.3', '2013098041711'), \
            ('17.1', '2013121191144'), \
            ('17.2', '2013131215648'), \
                   ] )