def __init__(self, butler, ingest_factory=IngestIndexedReferenceTask, *args, **kwargs):
     LoadReferenceObjectsTask.__init__(self, *args, **kwargs)
     ingest_config = butler.get(self.config.ingest_config_name, immediate=True)
     ingester = ingest_factory(butler=butler, config=ingest_config)
     self.indexer = ingester.indexer
     self.make_data_id = ingester.make_data_id
     self.ref_dataset_name = ingester.config.ref_dataset_name
     self.butler = butler
 def __init__(self, butler, *args, **kwargs):
     LoadReferenceObjectsTask.__init__(self, *args, **kwargs)
     self.dataset_config = butler.get("ref_cat_config", name=self.config.ref_dataset_name, immediate=True)
     self.indexer = IndexerRegistry[self.dataset_config.indexer.name](self.dataset_config.indexer.active)
     # This needs to come from the loader config, not the dataset_config since directory aliases can
     # change the path where the shards are found.
     self.ref_dataset_name = self.config.ref_dataset_name
     self.butler = butler
Ejemplo n.º 3
0
 def __init__(self, butler, *args, **kwargs):
     LoadReferenceObjectsTask.__init__(self, *args, **kwargs)
     dataset_config = butler.get("ref_cat_config",
                                 name=self.config.ref_dataset_name,
                                 immediate=True)
     self.indexer = IndexerRegistry[dataset_config.indexer.name](
         dataset_config.indexer.active)
     # This needs to come from the loader config, not the dataset_config since directory aliases can
     # change the path where the shards are found.
     self.ref_dataset_name = self.config.ref_dataset_name
     self.butler = butler
 def __init__(self,
              butler,
              ingest_factory=IngestIndexedReferenceTask,
              *args,
              **kwargs):
     LoadReferenceObjectsTask.__init__(self, *args, **kwargs)
     ingest_config = butler.get(self.config.ingest_config_name,
                                immediate=True)
     ingester = ingest_factory(butler=butler, config=ingest_config)
     self.indexer = ingester.indexer
     self.make_data_id = ingester.make_data_id
     self.ref_dataset_name = ingester.config.ref_dataset_name
     self.butler = butler
    def __init__(self, config=None, andConfig=None, **kwargs):
        """!Create a LoadAstrometryNetObjectsTask

        @param[in] config  configuration (an instance of self.ConfigClass); if None use self.ConfigClass()
        @param[in] andConfig  astrometry.net data config (an instance of AstromNetDataConfig, or None);
            if None then use andConfig.py in the astrometry_net_data product (which must be setup)
        @param[in] kwargs  additional keyword arguments for pipe_base Task.\_\_init\_\_

        @throw RuntimeError if andConfig is None and the configuration cannot be found,
            either because astrometry_net_data is not setup in eups
            or because the setup version does not include the file "andConfig.py"
        """
        LoadReferenceObjectsTask.__init__(self, config=config, **kwargs)
        self.andConfig = andConfig
        self.haveIndexFiles = False  # defer reading index files until we know they are needed
    def __init__(self, config, andConfig=None, **kwargs):
        """!Create a LoadAstrometryNetObjectsTask

        @param[in] config  configuration (an instance of self.ConfigClass)
        @param[in] andConfig  astrometry.net data config (an instance of AstromNetDataConfig, or None);
            if None then use andConfig.py in the astrometry_net_data product (which must be setup)
        @param[in] kwargs  additional keyword arguments for pipe_base Task.\_\_init\_\_

        @throw RuntimeError if andConfig is None and the configuration cannot be found,
            either because astrometry_net_data is not setup in eups
            or because the setup version does not include the file "andConfig.py"
        """
        LoadReferenceObjectsTask.__init__(self, config=config, **kwargs)
        self.andConfig = andConfig
        self.haveIndexFiles = False # defer reading index files until we know they are needed