<commit_before>#!/usr/bin/env python
"""
This script will query the CatSim database for stars in the Twinkles
field and produce a reference catalog that can be used to generate
astrometry.net index files.
"""
from __future__ import absolute_import
import argparse
import numpy
from lsst.sims.catalogs.measures.instance import InstanceCatalog
from lsst.sims.catalogs.generation.db import CatalogDBObject
from lsst.sims.catUtils.utils import ObservationMetaDataGenerator
from lsst.sims.catUtils.mixins import AstrometryStars, PhotometryStars

class SimulationReference(InstanceCatalog, AstrometryStars, PhotometryStars):
    "Reference stars for simulation astrometry."
    catalog_type = 'simulation_ref_star'
    column_outputs = ['uniqueId', 'raJ2000', 'decJ2000', 'lsst_u', 'lsst_g',
                      'lsst_r', 'lsst_i', 'lsst_z', 'lsst_y', 'isvariable']
    default_columns = [('isresolved', 0, int), ('isvariable', 0, int)]
    default_formats = {'S': '%s', 'f': '%.8f', 'i': '%i'}
    transformations = {'raJ2000': numpy.degrees, 'decJ2000': numpy.degrees}

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Generate the reference catalog')
    parser.add_argument('opsimDB', help='OpSim database sqlite file')
    parser.add_argument('opshistID', type=int,
                        help='Visit number to use as the center of the field')<commit_msg>use new sims packages in imports<commit_after>#!/usr/bin/env python
"""
This script will query the CatSim database for stars in the Twinkles
field and produce a reference catalog that can be used to generate
astrometry.net index files.
"""
from __future__ import absolute_import
import argparse
import numpy
from lsst.sims.catalogs.definitions import InstanceCatalog
from lsst.sims.catalogs.db import CatalogDBObject
from lsst.sims.catUtils.utils import ObservationMetaDataGenerator
from lsst.sims.catUtils.mixins import AstrometryStars, PhotometryStars

class SimulationReference(InstanceCatalog, AstrometryStars, PhotometryStars):
    "Reference stars for simulation astrometry."
    catalog_type = 'simulation_ref_star'
    column_outputs = ['uniqueId', 'raJ2000', 'decJ2000', 'lsst_u', 'lsst_g',
                      'lsst_r', 'lsst_i', 'lsst_z', 'lsst_y', 'isvariable']
    default_columns = [('isresolved', 0, int), ('isvariable', 0, int)]
    default_formats = {'S': '%s', 'f': '%.8f', 'i': '%i'}
    transformations = {'raJ2000': numpy.degrees, 'decJ2000': numpy.degrees}

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Generate the reference catalog')
    parser.add_argument('opsimDB', help='OpSim database sqlite file')
    parser.add_argument('opshistID', type=int,
                        help='Visit number to use as the center of the field')
{'fraction_non_alphanumeric': 0.11327561327561328, 'fraction_numerical': 0.013708513708513708, 'mean_word_length': 4.777083333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6938893', 'n_tokens_mistral': 880, 'n_tokens_neox': 837, 'n_words': 244}