Example #1
0
         cal_hx.calibration_person.organization_url = 'zonge.com'
         cal_hx.calibration_date = '2013-0gps_stamp_find = np.where(data == self._gps_flag_0)[0]5-04'
         cal_hx.units = 'mV/nT'
         
         m.add_calibration(cal_hx)
     
 m.close_mth5()
 ####------------------------------------------------------------------
 #### Make xml file for science base
 ####------------------------------------------------------------------
 # make a station database
 s_df, run_csv_fn = archive.combine_station_runs(station_save_dir)
 # summarize the runs
 s_df = archive.summarize_station_runs(s_df)
 # make xml file
 s_xml = sb_xml.XMLMetadata()
 s_xml.read_config_file(xml_cfg_fn)
 s_xml.supplement_info = s_xml.supplement_info.replace('\\n', '\n\t\t\t')
 
 # add station name to title
 s_xml.title += ', station {0}'.format(station)
 
 # location
 s_xml.survey.east = s_df.longitude
 s_xml.survey.west = s_df.longitude
 s_xml.survey.north = s_df.latitude
 s_xml.survey.south = s_df.latitude
 
 # get elevation from national map
 s_elev = archive.get_nm_elev(s_df.latitude, s_df.longitude) 
 s_xml.survey.elev_min = s_elev
Example #2
0
                cal_hx.calibration_person.organization_url = 'zonge.com'
                cal_hx.calibration_date = '2010-10-01'
                cal_hx.units = 'mV/nT'

                m.add_calibration(cal_hx)

        m.close_mth5()

        ####------------------------------------------------------------------
        #### Make xml file for science base
        ####------------------------------------------------------------------
        # make a station database
        s_cfg = archive.USGScfg()
        s_db, csv_fn = s_cfg.combine_run_cfg(station_save_dir)
        # make xml file
        s_xml = sb_xml.XMLMetadata()
        s_xml.read_config_file(xml_cfg_fn)
        s_xml.supplement_info = s_xml.supplement_info.replace(
            '\\n', '\n\t\t\t')

        # add station name to title
        s_xml.title += ', station {0}'.format(station)

        # location
        s_xml.survey.east = s_db.lon.median()
        s_xml.survey.west = s_db.lon.median()
        s_xml.survey.north = s_db.lat.median()
        s_xml.survey.south = s_db.lat.median()

        # get elevation from national map
        s_elev = archive.get_nm_elev(s_db.lat.median(), s_db.lon.median())