# Licensed under a 3-clause BSD style license - see LICENSE.rst
# flake8: noqa
"""
Expected values for online tests. For offline tests, these values
may be used to create mock responses.
"""

service_metadata = [{'ParameterName': 'INPUT:DATE',
                     'DataType': 'char',
                     'DefaultValue': 'NA',
                     'Doc': 'NA'}]

query_region_1 = {'4066c45407961eab48eb16bcb9c5b4b7',
                  '554b2bcb3b2a4353c515d20d9fc29e4e',
                  '711ce162a7488a72b1629d994264eae7',
                  'b9e211760ce74929919a55b225a9860c',
                  'f350fff2e9db68f5d3ca74c91f0e374a',
                  'f616cc460e51d2aa356ad21d79e22a21'}

query_region_2 = {'78aed36ad9bfaa561d78845757d0aad6',
                  '1e04390654cf399781bbacccce78a790',
                  'bf1aa2b1a3c6934bba18285572765d6f',
                  '7977c92b09724fb331b19263819962e4',
                  'f990925c8d99a66f642e4463f1dde7f2',
                  '09535b88fc700227bb47979a670a7d85'}

core_file_fields = [{'Field': 'archive_filename', 'Type': 'str', 'Desc': 'Filename assigned by the Archive'},
                    {'Field': 'caldat', 'Type': 'datetime64', 'Desc': 'The local calendar date of the telescope, at the start of PM observing.'},
                    {'Field': 'dateobs_center', 'Type': 'datetime64', 'Desc': 'DATE-OBS midpoint of range'},
                    {'Field': 'dateobs_max', 'Type': 'datetime64', 'Desc': 'DATE-OBS min,max'},
                    {'Field': 'dateobs_min', 'Type': 'datetime64', 'Desc': 'DATE-OBS min,max'},]

aux_file_fields = [{'Field': 'AIRMASS', 'Type': 'str', 'Desc': 'airmass at approx. start of exposure'},
                   {'Field': 'AOS', 'Type': 'str', 'Desc': 'AOS data available if true'},
                   {'Field': 'ASTIG1', 'Type': 'str', 'Desc': '4MAPS correction 1'},
                   {'Field': 'ASTIG2', 'Type': 'str', 'Desc': '4MAPS correction 2'},
                   {'Field': 'ASTRMREF', 'Type': 'str', 'Desc': 'Astrometric ref. catalog'},
                   {'Field': 'ATTNUM', 'Type': 'str', 'Desc': ''},
                   {'Field': 'AVSIG', 'Type': 'str', 'Desc': ''},
                   {'Field': 'AVSKY', 'Type': 'str', 'Desc': ''},
                   {'Field': 'AZ', 'Type': 'str', 'Desc': ''},
                   {'Field': 'BAND', 'Type': 'str', 'Desc': ''}]

query_file_metadata = ['             md5sum                                             archive_filename                                                                 original_filename                                   instrument proc_type',
                       '-------------------------------- ----------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ---------- ---------',
                       '0000f0c5015263610a75f0affed377d0 /net/archive/pipe/20161024/ct4m/2012B-0001/c4d_161025_034649_oki_z_v2.fits.fz /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_161025_034649_oki_z_v2.fits.fz      decam    skysub',
                       '0001e5a5bcf039ebf0c53a6da32e8888 /net/archive/pipe/20160928/ct4m/2012B-0001/c4d_160929_090838_ooi_z_v2.fits.fz /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160929_090838_ooi_z_v2.fits.fz      decam   instcal',
                       '0003a1c853de73fc1796d2d7d77ca9cd /net/archive/pipe/20160909/ct4m/2012B-0001/c4d_160910_062930_opd_z_v2.fits.fz /net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160910_062930_opd_z_v2.fits.fz      decam resampled']

query_file_metadata_minimal = ['             md5sum             ',
                               '--------------------------------',
                               '0000004ab27d9e427bb93c640b358633',
                               '000000cbd298b9ff697850a81620a797',
                               '0000010ae07a3caf4ea97c56027dc050',
                               '00000128678bd698542634bee19b0a2e',
                               '000001e869a186c08559535a7e56b7bc',]

query_file_meta_raw = [{"META": {"endpoint": "adv_search/find"},
                        "PARAMETERS": {"rectype": "file",
                                       "limit": 3,
                                       "sort": "md5sum",
                                       "json_payload": {"outfields": ["md5sum",
                                                                      "archive_filename",
                                                                      "original_filename",
                                                                      "instrument",
                                                                      "proc_type"],
                                                        "search": [["original_filename", "c4d_", "contains"]]}},
                        "HEADER": {"file:proc_type": "category",
                                   "file:md5sum": "str",
                                   "file:archive_filename": "str",
                                   "file:original_filename": "str",
                                   "file:instrument": "category"}},
                       {
                            "file:proc_type": "skysub",
                            "file:md5sum": "0000f0c5015263610a75f0affed377d0",
                            "file:archive_filename": "/net/archive/pipe/20161024/ct4m/2012B-0001/c4d_161025_034649_oki_z_v2.fits.fz",
                            "file:original_filename": "/net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_161025_034649_oki_z_v2.fits.fz",
                            "file:instrument": "decam"
                       },
                       {
                            "file:proc_type": "instcal",
                            "file:md5sum": "0001e5a5bcf039ebf0c53a6da32e8888",
                            "file:archive_filename": "/net/archive/pipe/20160928/ct4m/2012B-0001/c4d_160929_090838_ooi_z_v2.fits.fz",
                            "file:original_filename": "/net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160929_090838_ooi_z_v2.fits.fz",
                            "file:instrument": "decam"
                       },
                       {
                            "file:proc_type": "resampled",
                            "file:md5sum": "0003a1c853de73fc1796d2d7d77ca9cd",
                            "file:archive_filename": "/net/archive/pipe/20160909/ct4m/2012B-0001/c4d_160910_062930_opd_z_v2.fits.fz",
                            "file:original_filename": "/net/decdata1/deccp/NHPPS_DATA/DCP/Final/Submitted/c4d_160910_062930_opd_z_v2.fits.fz",
                            "file:instrument": "decam"
                       }]

query_file_meta_raw_minimal = [{'META': {'endpoint': 'adv_search/find'},
                                'PARAMETERS': {'rectype': 'file',
                                               'format': 'json',
                                               'limit': 5,
                                               'sort': 'md5sum'},
                                'HEADER': {'file:md5sum': 'str'}},
                               {'file:md5sum': '0000004ab27d9e427bb93c640b358633',},
                               {'file:md5sum': '000000cbd298b9ff697850a81620a797',},
                               {'file:md5sum': '0000010ae07a3caf4ea97c56027dc050',},
                               {'file:md5sum': '00000128678bd698542634bee19b0a2e',},
                               {'file:md5sum': '000001e869a186c08559535a7e56b7bc',}]

core_hdu_fields = [{'Field': 'dec_center', 'Type': 'np.float64', 'Desc': 'DEC center from pipeline processing'},
                   {'Field': 'dec_max', 'Type': 'np.float64', 'Desc': 'DEC min,max range of HDU'},
                   {'Field': 'dec_min', 'Type': 'np.float64', 'Desc': 'DEC min,max range of HDU'},
                   {'Field': 'fitsfile', 'Type': 'str', 'Desc': ''},
                   {'Field': 'hdu_idx', 'Type': 'np.int64', 'Desc': ''},
                   {'Field': 'id', 'Type': 'str', 'Desc': ''},
                   {'Field': 'ra_center', 'Type': 'np.float64', 'Desc': 'RA center from pipeline processing'},
                   {'Field': 'ra_max', 'Type': 'np.float64', 'Desc': 'RA min,max range of HDU'},
                   {'Field': 'ra_min', 'Type': 'np.float64', 'Desc': 'RA min,max range of HDU'},
                   {'Field': 'updated', 'Type': 'datetime64', 'Desc': 'When Hdu created/updated'}]

aux_hdu_fields = [{'Field': 'AMPMTCH', 'Type': 'str', 'Desc': ''},
                  {'Field': 'ARAWGAIN', 'Type': 'str', 'Desc': '[e/adu] Average raw gain'},
                  {'Field': 'AVSIG', 'Type': 'str', 'Desc': ''},
                  {'Field': 'AVSKY', 'Type': 'str', 'Desc': ''},
                  {'Field': 'BIASFIL', 'Type': 'str', 'Desc': 'Bias'},
                  {'Field': 'BLDINTRP', 'Type': 'str', 'Desc': ''},
                  {'Field': 'BPM', 'Type': 'str', 'Desc': ''},
                  {'Field': 'BPMFIL', 'Type': 'str', 'Desc': 'BPM file used to build mask'},
                  {'Field': 'CCDNUM', 'Type': 'str', 'Desc': ''},
                  {'Field': 'CD1_1', 'Type': 'str', 'Desc': 'Coordinate matrix'}]

query_hdu_metadata = ['      CD1_2             CD1_1       proc_type              md5sum                caldat                               archive_filename                            instrument EXPTIME AIRMASS',
                      '----------------- ----------------- --------- -------------------------------- ---------- ----------------------------------------------------------------------- ---------- ------- -------',
                      '7.28535892432e-05 -1.8249413473e-07       raw 004a631d6f5493e8adeb7123255380cb 2017-08-15 /net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz      decam      90    1.04',
                      '7.28535892432e-05 -1.8249413473e-07       raw 004a631d6f5493e8adeb7123255380cb 2017-08-15 /net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz      decam      90    1.04',
                      '7.28535892432e-05 -1.8249413473e-07       raw 004a631d6f5493e8adeb7123255380cb 2017-08-15 /net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz      decam      90    1.04']

query_hdu_metadata_raw = [{"META": {"endpoint": "adv_search/find"},
                           "PARAMETERS": {"rectype": "hdu",
                                          "format": "json",
                                          "limit": 3,
                                          "sort": "md5sum",
                                          "count": "n",
                                          "json_payload": {"outfields": ["md5sum",
                                                                         "archive_filename",
                                                                         "caldat",
                                                                         "instrument",
                                                                         "proc_type",
                                                                         "EXPTIME",
                                                                         "AIRMASS",
                                                                         "hdu:CD1_1",
                                                                         "hdu:CD1_2"],
                                                           "search": [["caldat", "2017-08-14", "2017-08-16"],
                                                                      ["instrument", "decam"],
                                                                      ["proc_type", "raw"]]}},
                           "HEADER": {"hdu:CD1_2": "str", "hdu:CD1_1": "str",
                                      "file:proc_type": "category", "file:md5sum": "str",
                                      "file:caldat": "datetime64", "file:archive_filename": "str",
                                      "file:instrument": "category", "file:EXPTIME": "str", "file:AIRMASS": "np.float64"}},
                          {"hdu:CD1_2": 0.0000728535892432,
                           "hdu:CD1_1": -1.8249413473e-7,
                           "file:proc_type": "raw",
                           "file:md5sum": "004a631d6f5493e8adeb7123255380cb",
                           "file:caldat": "2017-08-15",
                           "file:archive_filename": "/net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz",
                           "file:instrument": "decam",
                           "file:EXPTIME": 90.0,
                           "file:AIRMASS": 1.04},
                          {"hdu:CD1_2": 0.0000728535892432,
                           "hdu:CD1_1": -1.8249413473e-7,
                           "file:proc_type": "raw",
                           "file:md5sum": "004a631d6f5493e8adeb7123255380cb",
                           "file:caldat": "2017-08-15",
                           "file:archive_filename": "/net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz",
                           "file:instrument": "decam",
                           "file:EXPTIME": 90.0,
                           "file:AIRMASS": 1.04},
                          {"hdu:CD1_2": 0.0000728535892432,
                           "hdu:CD1_1": -1.8249413473e-7,
                           "file:proc_type": "raw",
                           "file:md5sum": "004a631d6f5493e8adeb7123255380cb",
                           "file:caldat": "2017-08-15",
                           "file:archive_filename": "/net/archive/mtn/20170815/ct4m/2017B-0110/c4d_170816_095757_ori.fits.fz",
                           "file:instrument": "decam",
                           "file:EXPTIME": 90.0,
                           "file:AIRMASS": 1.04}]

categoricals = {'instruments': ['(p)odi',
                                '90prime',
                                'andicam',
                                'arcoiris',
                                'arcon',
                                'bench',
                                'ccd_imager',
                                'ccd_spec',
                                'chiron',
                                'cosmos',
                                'cpapir',
                                'decam',
                                'echelle',
                                'falmingos',
                                'flamingos',
                                'ghts_blue',
                                'ghts_blue_imager',
                                'ghts_red',
                                'ghts_red_imager',
                                'goodman',
                                'goodman spectrograph',
                                'gtcam',
                                'hdi',
                                'hlsp_bok23m',
                                'hlsp_decam',
                                'hlsp_ir_imager',
                                'hlsp_ls',
                                'hlsp_mosaic',
                                'hlsp_mosaic3',
                                'hlsp_mosaic_2',
                                'hlsp_wise',
                                'ice',
                                'ir_imager',
                                'ispi',
                                'kosmos',
                                'minimo/ice',
                                'mop/ice',
                                'mosaic',
                                'mosaic3',
                                'mosaic_1',
                                'mosaic_1_1',
                                'mosaic_2',
                                'newfirm',
                                'osiris',
                                'pfccd',
                                'sami',
                                'soi',
                                'spartan',
                                'spartan ir camera',
                                'triplespec',
                                'wfc',
                                'whirc',
                                'wildfire',
                                'y4kcam'],
                'obsmodes': ['acq',
                             'imaging',
                             'sos_slit',
                             'spec',
                             'stare'],
                'obstypes': ['acq',
                             'acquire',
                             'arc',
                             'bias',
                             'calibration',
                             'calibration or comparison',
                             'comp',
                             'comparison',
                             'dark',
                             'dflat',
                             'dome flat',
                             'dome or projector flat',
                             'domeflat',
                             'expose',
                             'flat',
                             'focus',
                             'fringe',
                             'fringecor',
                             'guider',
                             'illum',
                             'illumcor',
                             'illumination calibration',
                             'junk',
                             'lampflat',
                             'none',
                             'nota',
                             'obj',
                             'object',
                             'phot flat',
                             'photometric standard',
                             'projector',
                             'projector flat',
                             'pupil',
                             'red',
                             'remap',
                             'sflat',
                             'sky',
                             'sky flat',
                             'skyflat',
                             'spectrum',
                             'standard',
                             'std',
                             'test',
                             'unknown',
                             'zero'],
                'proctypes': ['instcal',
                              'mastercal',
                              'nota',
                              'projected',
                              'raw',
                              'resampled',
                              'skysub',
                              'stacked',
                              'starsubtracted'],
                'prodtypes': ['blobmodel',
                              'chi2',
                              'depth',
                              'dqmask',
                              'expmap',
                              'flag',
                              'galdepth',
                              'graphics (size)',
                              'image',
                              'image 2nd version 1',
                              'image1',
                              'invvar',
                              'maskbits',
                              'model',
                              'ncomb',
                              'nexp',
                              'nota',
                              'nrej',
                              'psfdepth',
                              'psfsize',
                              'resampled',
                              'rms',
                              'sigma',
                              'weight',
                              'wtmap'],
                'sites': ['cp',
                          'ct',
                          'kp',
                          'lp',
                          'ls'],
                'surveys': [],
                'telescopes': ['bok23m',
                               'ct09m',
                               'ct13m',
                               'ct15m',
                               'ct1m',
                               'ct4m',
                               'ctlab',
                               'kp09m',
                               'kp21m',
                               'kp35m',
                               'kp4m',
                               'kpcf',
                               'lp25m',
                               'ls_coadd',
                               'soar',
                               'wise',
                               'wiyn']}

get_file = {'DATE': '2009-09-06T20:13:15',
            'TELESCOP': 'KPNO 4.0 meter telescope',
            'INSTRUME': 'newfirm',
            'CHECKSUM': '7GBmAGAm7GAmAGAm',
            'DATASUM': '0'}

version = '7.0'

get_token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
