original_docstring: Load a tile database from the opsdb, or optionally read
        from FITS table file. Default is read from SQL operations database.
  
        Parameters
        ----------
        targets : ~lvmsurveysim.target.target.TargetList or path-like
           Optional, the `~lvmsurveysim.target.target.TargetList` object associated
           with the tile database or a path to the target list to load. If
           `None`, the ``TARGFILE`` value stored in the database file will be
           used to find abd load the correct target list.
        fits : boolean
           Optional, load from a FITS table rather than SQL
        path : str or ~pathlib.Path
           Optional, the path and basename of the tile fits file, no extension.
           Expects to find 'path.fits'.
  
        Returns
        -------
        ~lvmsurveysim.schedule.TileDB
           TileDB instance
        
docstring: Load a tile database from the opsdb, or optionally read
  from FITS table file. Default is read from SQL operations database.
  
  Parameters
  
  targets : ~lvmsurveysim.target.target.TargetList or path-like
  Optional, the `~lvmsurveysim.target.target.TargetList` object associated
  with the tile database or a path to the target list to load.
  
  Returns
  
  
docstring_tokens: Load a tile database from the opsdb or optionally read from FITS table file . Default is read from SQL operations database . Parameters targets : ~lvmsurveysim . target . target . TargetList or path - like Optional the ` ~lvmsurveysim . target . target . TargetList ` object associated with the tile database or a path to the target list to load . Returns
code: def load_tiledb(cls, targets=None, fits=False, path=None):
        """Load a tile database from the opsdb, or optionally read
        from FITS table file. Default is read from SQL operations database.
  
        Parameters
        ----------
        targets : ~lvmsurveysim.target.target.TargetList or path-like
           Optional, the `~lvmsurveysim.target.target.TargetList` object associated
           with the tile database or a path to the target list to load. If
           `None`, the ``TARGFILE`` value stored in the database file will be
           used to find abd load the correct target list.
        fits : boolean
           Optional, load from a FITS table rather than SQL
        path : str or ~pathlib.Path
           Optional, the path and basename of the tile fits file, no extension.
           Expects to find 'path.fits'.
  
        Returns
        -------
        ~lvmsurveysim.schedule.TileDB
           TileDB instance
        """
  
        if fits:
           assert path != None, "path not provided for FITS save"
           tile_table = astropy.table.Table.read(path+'.fits')
  
           targfile = tile_table.meta.get('TARGFILE', 'NA')
           targhash = tile_table.meta.get('TARGHASH', 'NA')
           scitile1 = tile_table.meta.get('SCITILE1')
           targets = targets or targfile
        else:
           with cls.get_db().atomic():
                 targfile = cls.get_metadata('targfile', default_value='NA')
                 targhash = cls.get_metadata('targhash', default_value='NA')
                 scitile1 = cls.get_metadata('scitile1')
                 targets = targets or targfile
                 tile_table = s2a.peewee2astropy(Tile)
  
        if not isinstance(targets, lvmsurveysim.target.TargetList):
           assert targets is not None and targets != 'NA', \
                 'invalid or unavailable target file path.'
  
           if not os.path.exists(targets):
                 raise LVMSurveyOpsError(
                    f'the target file {targets!r} does not exists. '
                    'Please, call load with a targets parameter.')
  
           assert targhash == cls.md5(targets), 'Target file md5 hash not identical to database value'
  
           targets = lvmsurveysim.target.TargetList(target_file=targets)
  
        if (scitile1 != None):
           scitile1 = int(scitile1)
        tiledb = lvmsurveysim.schedule.TileDB(targets, tile_tab=tile_table, tileid_start=scitile1)
  
        return tiledb
code_tokens: def load_tiledb ( cls , targets = None , fits = False , path = None ) : if fits : assert path != None , "path not provided for FITS save" tile_table = astropy . table . Table . read ( path + '.fits' ) targfile = tile_table . meta . get ( 'TARGFILE' , 'NA' ) targhash = tile_table . meta . get ( 'TARGHASH' , 'NA' ) scitile1 = tile_table . meta . get ( 'SCITILE1' ) targets = targets or targfile else : with cls . get_db ( ) . atomic ( ) : targfile = cls . get_metadata ( 'targfile' , default_value = 'NA' ) targhash = cls . get_metadata ( 'targhash' , default_value = 'NA' ) scitile1 = cls . get_metadata ( 'scitile1' ) targets = targets or targfile tile_table = s2a . peewee2astropy ( Tile ) if not isinstance ( targets , lvmsurveysim . target . TargetList ) : assert targets is not None and targets != 'NA' , 'invalid or unavailable target file path.' if not os . path . exists ( targets ) : raise LVMSurveyOpsError ( f'the target file {targets!r} does not exists. ' 'Please, call load with a targets parameter.' ) assert targhash == cls . md5 ( targets ) , 'Target file md5 hash not identical to database value' targets = lvmsurveysim . target . TargetList ( target_file = targets ) if ( scitile1 != None ) : scitile1 = int ( scitile1 ) tiledb = lvmsurveysim . schedule . TileDB ( targets , tile_tab = tile_table , tileid_start = scitile1 ) return tiledb
short_docstring: Load a tile database from the opsdb, or optionally read
  from FITS table file.
short_docstring_tokens: Load a tile database from the opsdb or optionally read from FITS table file .
comment: """Load a tile database from the opsdb, or optionally read
        from FITS table file. Default is read from SQL operations database.
  
        Parameters
        ----------
        targets : ~lvmsurveysim.target.target.TargetList or path-like
           Optional, the `~lvmsurveysim.target.target.TargetList` object associated
           with the tile database or a path to the target list to load. If
           `None`, the ``TARGFILE`` value stored in the database file will be
           used to find abd load the correct target list.
        fits : boolean
           Optional, load from a FITS table rather than SQL
        path : str or ~pathlib.Path
           Optional, the path and basename of the tile fits file, no extension.
           Expects to find 'path.fits'.
  
        Returns
        -------
        ~lvmsurveysim.schedule.TileDB
           TileDB instance
        """