Observation metadata web services

Find observations

Search the database for observations that satisfy given criteria.

For manual (human) use, omit all parameters and use the base URL to get a form where you can just fill in the relevant criteria: http://ws.mwatelescope.org/metadata/find

If you are writing code to search for observations, append the search criteria parameters to the URL.

eg, http://ws.mwatelescope.org/metadata/find?creator=randall&future=1 

The full list of allowed constraints is:

  • mintimemaxtime: Minimum and maximum values of 'starttime' for the observation. Times are INCLUSIVE of the endpoints, e.g. comparisons use 'starttime>=mintime and startttime<=maxtime'.

  • mintime_utc, maxtime_utc: As above, but expressed as strings (passed directly to astropy.time.Time() for parsing).

  • minduration: Minimum observation duration (stoptime - starttime), in seconds.

  • minramaxra: Minimum and maximum values for ra_pointing for the observation, in degrees. NOTE - if maxra < minra, the values returned wrap around 0/360, e.g. use maxra=10 and minra=350.

  • mindecmaxdec: Minimum and maximum values for dec_pointing for the observation, in degrees.

  • mingal_long, maxgal_long: Minimum and maximum values for gal_long for the observation, in degrees. NOTE - if maxgal_long< mingal_long, the values returned wrap around 0/360, e.g. use maxgal_long=10 and mingal_long=350.

  • mingal_lat, maxgal_lat: Minimum and maximum values for gal_lat for the observation, in degrees.

  • minelmaxel: Minimum and maximum values for elevation_pointing for the observation, in degrees.

  • minazmaxaz: Minimum and maximum values for azimuth_pointing for the observation, in degrees. NOTE - if maxaz < minaz, the values returned wrap around 0/360, e.g. use maxaz=10 and minaz=350.

  • minlstmaxlst: Minimum and maximum values for Local Sidereal Time for the observation, in degrees. NOTE - if maxlst < minlst, the values returned wrap around 0/360, e.g. use maxlst=10 and minlst=350.

  • minsunelmaxsunel: Minimum and maximum values for sun_elevation for the observation, in degrees.

  • minsunpdmaxsunpd: Minimum and maximum values for sun_pointing_distance for the observation, in degrees.

  • projectid: A string to match against the projectid field for the observation.

  • groupid: The observation ID (GPS statart time) of the first observation in the same observation block (scheduled with the same command). 

  • mode: A string to match against the observing mode, e.g. 'HW_LFILES', 'VOLTAGE_START', etc.

  • creator: A string to match against the name of the person creating that observation.

  • obsname: A string to match against the observation name.

  • recomined, notrecombined: Whether or not the raw VCS observation files have been pre-processed.

  • deleted, notdeleted: Whether or not the observation data files have been deleted.

  • contigfreq: Pass 1 to match only observations with 24 contiguous frequency channels, or 0 to match only observations with gaps in the frequency channels.

  • calibration: Pass 1 to match only calibration observations, or 0 to match only observations that are NOT calibrations.

  • cenchan: Select only observations with this centre frequency channel.

  • anychan: Select only observations that include this channel in their list of 24 frequency channels.

  • freq_res: Select only observations with the correlator set to this frequency resolution (currently, the only valid numbers are 10, 20, and 40 kHz).

  • int_time: Select only observations with the correlator set to this integration time (currently, the only valid numbers are 0.5, 1.0, 2.0 and 4.0 seconds).

  • future: Pass 1 to match only observations that have not yet happened, or 0 to match only observations that are in the past.

  • dataquality: Pass one or more possible data quality flags (digits from 1 to 6) to match against. The values are 1 (Good), 2 (Some Issues), 3 (Unusable), 4 (Deleted), 5 (Marked for deletion) or 6 (Processed). For example, passing 1 returns only 'Good' observations, 12returns only 'Good' or 'Some Issues', 345 returns only unusable/deleted/marked-for-deletion observations, etc.

  • gridpoint: An integer to match against the gridpoint_number column in the schedule_metadata table.

  • minfiles: Select only observations with at least this many data files recorded.

  • archived: Only return observations where all data files have been archived.

  • min_total_tiles, max_total_tiles: Specify minimum and maximum values for the total number of tiles in the array (always 128, before the MWAX correlator was deployed).

  • min_good_tiles: The minimum number of good (no errors, not flagged) tiles in the observation.

  • max_bad_tiles: The maximum number of bad (errors, or flagged) tiles in the observation.

  • delete_id: Only return observations that are part of the given deletion request (the ID is an integer). 

  • any_deletion: Only return observations that are part of (any) deletion request - even cancelled and actioned ones.

Other parameters control the output, and output format:

  • extended: If specified, an extended set of parameters are returned in the output list (see below).

  • dict: If specified, a dictionary is returned, instead of a list, with even more parameters (see below).

  • pretty: If passed, and non-zero, the JSON output is padded with spaces and newlines to make it more human-readable.

  • sortorder: Either 'asc' or 'desc'. Determines the sort order for both grouping results into pages, and for list and html output, the order within the returned structure.

  • pagesize: By default, the web service returns a maximum of 200 observations at a time. Use this parameter to specify a smaller page size, or (with care) a larger one.

  • page: By default, the web service returns the first pagesize results. If you pass a number in the page argument, then that 'page' of results is returned instead.

  • html: If this parameter is given, the results are returned in human-readable format as a web page, instead of a JSON structure. The SQL query that generated the result will be shown at the top, and if there are more than pagesize observations, buttons to skip to other pages will be shown as well. Clicking on the obsid in the results takes you to the observation summary page (described below).

Any constraints that take strings (projectidmodeobsname and creator) accept the standard PostgreSQL wildcard characters. A percent character (%) means 'match zero or more of any character', and an underscore (_) means 'match exactly one of any character'. If you wish to match an actual percent or underscore character, escape it with a single leading backslash (e.g. foo\_bar).

Normally, the parameters returned are:

  • starttime (obsid in GPS seconds)

  • obsname

  • creator

  • projectid

  • ra_pointing (in degrees)

  • dec_pointing (in degrees)

if you pass the the extended parameter, then more parameters are returned for each matching observation:

  • starttime (obsid in GPS seconds)

  • stoptime (in GPS seconds)

  • obsname

  • creator

  • projectid

  • ra_pointing (in degrees)

  • dec_pointing (in degrees)

  • azimuth (in degrees)

  • elevation (in degrees)

  • ra_phase_center (in degrees)

  • dec_phase_center (in degrees)

  • local_sidereal_time_deg (in degrees)

  • gridpoint_number

If you pass the dict parameter, then a dictionary is returned, containing even more parameters:

  • starttime (obsid in GPS seconds)

  • stoptime (in GPS seconds)

  • obsname

  • creator

  • projectid

  • ra_pointing (in degrees)

  • dec_pointing (in degrees)

  • azimuth (in degrees)

  • elevation (in degrees)

  • ra_phase_center (in degrees)

  • dec_phase_center (in degrees)

  • local_sidereal_time_deg (in degrees)

  • gridpoint_name ('EOR1' or 'sweet')

  • gridpoint_number

  • dataquality

  • dataqualitycomment

  • mode (eg 'HW_LFILES')

  • int_time (correlator integration time)

  • freq_res (correlator frequency resolution)

  • frequencies (list of 24 coarse channel numbers)

  • processed (whether VCS raw data files have been pre-processed/recombined)

  • deleted_timestamp (when the observation was deleted, or None if it has not been deleted)

  • calibration (True if this is a calibration observation)

  • calibrators (the names of the calibration source in this observation)

  • groupid (The observation ID - GPS statart time - of the first observation in the same observation block)

  • good_tiles (number of tiles without flags or errors in this observation)

  • total_tiles (total number of tiles, good and bad, at the time of the observation)

  • bad_tiles (number of tiles that had errors, or were flagged)

If you pass 1 to the pretty parameter, than the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed, then the results are not indented.

Search for or view MWA project IDs

eg, https://ws.mwatelescope.org/metada/projects or https://ws.mwatelescope.org/metadata/projects?projectid=G00% 

This service returns details about all MWA projects (if called with no options) or all project IDs matching the given projectid parameter, where the '%' character is a wild card, matching zero or more characters in the project ID.

If the 'html' parameter is provided, and is 'on', 'true', or 1, or if the web service is called from a web browser, then a human-readable HTML table is returned, including a link in each row to search for all observations matching that project ID. Otherwise, a JSON structure is returned, for use in your code.

Possible parameters are:

  • projectid or project_id: The project ID to search for, or a string with one or more '%' characters as wildcards, eg, 'G006%' will match G0060, G0061, ... G0069

  • html: Pass  'on', 'true', or 1 for HTML format output, otherwise JSON data will be returned.

Get a 'metafits' file with observation AND telescope configuration data, for a given observation

eg, http://ws.mwatelescope.org/metadata/fits?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/fits?filename=1095675784_20140925102450_gpubox23_01.fits 

This service takes returns a metafits file (described HERE) for a given observation. The observation can be specified by passing either an observation ID (starttime in GPS seconds) with the 'obs_id' parameter, or by passing the full name of a data file recorded by that observation using the 'filename' parameter. If neither obs_id or filename are passed, a metafits file is returned for the most recent observation actually observed by the telescope.

There are optional parameters that affect the contents of the metafits file:

  • min_bad_dipoles: A number from 1-16. If either polarisation on a single tile has this many dipoles (or more), flag it as bad. The default (min_bad_dipoles=2) means that if a tile has more than one bad dipole in either or both of X and Y, it will be flagged (deprecated).

  • max_bad_dipoles: A number from 1-16. If either polarisation on a single tile has more than this many dipoles, flag it as bad. The default (max_bad_dipoles=1) means that if a tile has more than one bad dipole in either or both of X and Y, it will be flagged.

  • nocache: Don't use cached observation data.

  • include_calib: Include calibration fit data from the nearest calibration observation that has already been reduced, if one is within plus or minus one day of the given obs_id.

  • include_ppds: Include two extra HDUs ('DigGains' and 'PPDs') with digital gains for each cable flavour, and PPD data (full 0-32768 MHz average powers in every coarse channel, for every tile, for the duration of the observation, recorded every 64 seconds for each tile).

  • flag_faults: Defaults to 1. If flag_faults=0 then tiles with observing faults (comms errors, too many bad dipoles, etc) are NOT flagged in the metafits file data table.

If you are making a query, and you don't want the results taken from the cache (you want them to be read directly from the database) than add the nocache parameter to your query. Note that this can be hundreds of times slower than using the cached data, so this parameter should be used rarely.

If you are using the offline correlator to turn all or part of a voltage-capture observation into visibilities, you'll need a customised metafits file describing the data to pass to the offline correlator (and to reduce the visibilities after they are created). To produce one of these customised metafits files, call the 'fits' web service with the obs_id or filename parameter for the full (voltage capture) observation, along with one or more of these parameters:

  • new_starttime: Must be an integer multiple of 8 GPS seconds, inside the main observation. Becomes the new, fictitious 'obsid' of the customised observation fragment.

  • new_stoptime: Must be an integer multiple of 8 GPS seconds, inside the main observation. Becomes the new, 'stoptime' of the customised observation fragment.

  • new_freqres: New correlator frequency resolution, in kHz. Must be a valid MWAX frequency resolution value, (0.2, 0.4, ... 10, 20, 40, ... 1280).

  • new_inttime: New correlator integration dump time, in seconds. Must be a valid MWAX integration time (0.25, 0.5, 1.0, 2.0, 4.0, 8.0).

  • new_mode: New correlator mode string - must be one of 'MWAX_VCS' or 'MWAX_CORRELATOR'.

These fields in the metafits file will be customised for the new observing details: GPSTIME, MODE, EXPOSURE, FINECHAN, INTTIME, NAV_FREQ, NCHANS, NSCANS, DATESTRT, DATE-OBS, MJD, RA, DEC.

These fields in the metafits file will NOT be changed, and retain the original values - calculated for the midpoint of the full, original observation time: SUN-ALT, SUN-DIST, MOONDIST, JUP-DIST, LST

Get observation/schedule data for an observation

eg, http://ws.mwatelescope.org/metadata/obs?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/obs?filename=1095675784_20140925102450_gpubox23_01.fits 

This service returns details about a single observation. The observation can be specified by passing either an observation ID (starttime in GPS seconds) with the obs_id or obsid parameter, or by passing the full name of a data file recorded by that observation using the filename parameter. If neither obs_id/obsid or filename are passed, data is returned for the most recent observation actually observed by the telescope.

If the filetype parameter is passed, only files of that type are returned in the observation info structure (e.g. filetype=8 gives you normal correlated data files, filetype=1 gives you flag files). This parameter is only likely to be useful for voltage capture observations, which can contain thousands of files - you can use the filetype argument to have some (or none) of these file details returned, to speed up the query.

If an observation taken more than one week ago is queried, the details are cached on the server, to speed up subsequent queries about the same object. Observations in the future, or less than a few days old, will have details in the database change as tiles are flagged or observation logs are analysed, so it's not worth saving the data in the query cache.

If you are making a query, and you don't want the results taken from the cache (you want them to be read directly from the database) than add the nocache parameter to your query. Note that this can be hundreds of times slower than using the cached data, so this parameter should be used rarely.

If you pass 1 to the pretty parameter, than the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed, then the results are not indented.

This service returns a hierarchical structure (as a string in JSON format) that contains every detail about that observation. That string can then be converted from JSON format to a Python dictionary - an example would be:



{

"starttime": 1096952256 "stoptime": 1096952552, "freq_res": 40, "int_time": 0.5, "dataquality": 1, "dataqualitycomment": "", "dataready": true, "origkey": [1096952256], "log": null, "dec_phase_center": -6.5297643697349796, "ra_phase_center": 194.69351514167101, "unpowered_tile_name": "default", "new": false, "voltagebeams": [], "obsname": "Sun", "rtssettings": null, "mode": "HW_LFILES", "creator": "rwayth", "projectid": "G0002",

"faults": { "badgains": {}, "rawerrors": ["No status for rec15"], "cookederrors": ["Bad Receiver State:[rec15]"], "badpointings": {}, "badfreqs": {}, "flagged": {}, "badstates": {"15": [151, 152, 153, 154, 155, 156, 157, 158] } },

"bad_tiles": [151, 152, 153, 154, 155, 156, 157, 158],

"logs": { "eab54fbe-4fa8-11e4-ac8a-001e689b5818": { "comment": "/usr/local/bin/single_observation.py --starttime=2014-10-10,04:57:18 --stoptime=++296s --freq=62;63;69;70;76;77;84;85;93;94;103;104;113;114;125;126;139;140;153;154;169;170;187;188 --obsname=Sun --inttime=0.5 --freqres=40 --creator=rwayth --useazel --usegrid= --project=G0002 --gain_control_value=14 --source=Sun", "modtime": "2014-10-09T11:39:23.876102+00:00", "observation": null, "creator": "rwayth", "log_id": "eab54fbe-4fa8-11e4-ac8a-001e689b5818", "referencetime": 1096952256.0, "logtype": 5, "endtime": 1096952552.0 }, "222b3506-50e6-11e4-844c-001e689b5818": { "comment": "No status for rec15", "modtime": "2014-10-11T01:30:07.390286+00:00", "observation": null, "creator": "ocheck.py", "log_id": "222b3506-50e6-11e4-844c-001e689b5818", "referencetime": 1096952256.0, "logtype": 7, "endtime": 1096952552.0 }

"alldelays": { "11": [ [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0], [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0] ],

"12": [ [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0], [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0] ],

                ...

"167": [ [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0], [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0] ],

"168": [ [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0], [15, 13, 11, 9, 12, 10, 8, 6, 9, 32, 5, 3, 6, 4, 2, 0] ]

                }

"bftemps": { "11": ["Tile011", 1, 1, 49.29999999999998], "12": ["Tile012", 1, 2, 48.399999999999984],

                ...

                "167": ["Tile167", 16, 7, 47.70000000000002], 

"168": ["Tile168", 16, 8, 46.899999999999984] },

"rfstreams": { "0": { "starttime": 1096952256, "number": 0, "creator": "rwayth", "bad_tiles": [151,152,153,154,155,156,157,158], "origkey": [1096952256, 0], "delays": [15, 13, 11, 9, 12, 10, 8, 6, 9, 7, 5, 3, 6, 4, 2, 0], "hex": "", "ra": null, "frequency_type": "CHANNEL", "new": false, "gain_control_value": 14.0, "elevation": 64.693399999999997, "frequencies": [62, 63, 69, 70, 76, 77, 84, 85, 93, 94, 103, 104, 113, 114, 125, 126, 139, 140, 153, 154, 169, 170, 187, 188], "gain_control_type": "DB_BF", "dipole_exclusion": "default", "walsh_mode": "OFF", "vsib_frequency": 113, "azimuth": 326.31, "dec": null, "tile_selection": "all_on" "bad_dipoles": { "153": [ [16], [13] ], "155": [ [16], [] ], "157": [ [16], [] ], "156": [ [], [13] ], "114": [ [12], [] ], "131": [ [], [15] ], "111": [ [10], [] ], "136": [ [16], [16] ], "113": [ [6], [] ], "68": [ [13], [] ], "83": [ [], [9] ], "138": [ [13], [] ], "87": [ [], [10] ], "26": [ [], [16] ], "22": [ [], [13] ], "43": [ [14], [] ], "122": [ [], [1] ], "143": [ [], [13] ], "141": [ [8], [] ], "77": [ [13], [] ], "121": [ [14], [] ], "75": [ [1], [] ], "168": [ [], [10] ], "126": [ [], [9] ], "92": [ [1], [] ], "95": [ [6], [] ], "107": [ [9], [] ], "97": [ [], [15] ], "163": [ [], [13] ], "13": [ [14], [1] ], "17": [ [13], [] ], "31": [ [5], [] ], "88": [ [16], [] ], "34": [ [10], [] ], "73": [ [14], [] ] }, "tileset": { "ylist": [11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, 111, 112, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 128, 131, 132, 133, 134, 135, 136, 137, 138, 141, 142, 143, 144, 145, 146, 147, 148, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 165, 166, 167, 168], "xlist": [11, 12, 13, 14, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 41, 42, 43, 44, 45, 46, 47, 48, 51, 52, 53, 54, 55, 56, 57, 58, 61, 62, 63, 64, 65, 66, 67, 68, 71, 72, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 97, 98, 101, 102, 103, 104, 105, 106, 107, 108, 111, 112, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 127, 128, 131, 132, 133, 134, 135, 136, 137, 138, 141, 142, 143, 144, 145, 146, 147, 148, 151, 152, 153, 154, 155, 156, 157, 158, 161, 162, 163, 164, 165, 166, 167, 168], "name": "all_on", "creator": "mwa" }, } }, "metadata": { "local_sidereal_time_deg": 209.72987912278401, "ra_pointing": 195.77112036706501, "elevation_pointing": 64.693399999999997, "calibration": false, "azimuth_pointing": 326.30990000000003, "gridpoint_name": "sweet", "jupiter_pointing_distance": 59.199361313084701, "sun_elevation": 65.766122499057701, "sky_temp": 378.79364146732502, "dec_pointing": -5.0010847948659203, "moon_pointing_distance": 156.59922736056001, "sun_pointing_distance": 1.5955869339600499, "gridpoint_number": 44, "calibrators": "" }, "files": { "1096952256_20141010045822_gpubox20_01.fits": { "site_path": "http://mwangas/RETRIEVE?file_id=1096952256_20141010045822_gpubox20_01.fits", "host": "gpubox20", "filetype": 8, "remote_archived": true, "deleted": false, "size": 1015030080 }, ... "1096952256_20141010045922_gpubox04_02.fits": { "site_path": "http://mwangas/RETRIEVE?file_id=1096952256_20141010045922_gpubox04_02.fits", "host": "gpubox04", "filetype": 8, "remote_archived": true, "deleted": false, "size": 1015030080 }

"tdict": { "11": ["Tile011", 1, 1, false], "12": ["Tile012", 1, 2, false],

                ...

"167": ["Tile167", 16, 7, false], "168": ["Tile168", 16, 8, false] },

}, }



Note that this hierarchical structure is almost identical to the structure returned by schedule.MWA_Setting() - the main difference is that any values uses as keys to dictionaries (e.g. the 'number' in the .rfstreams dictionary, or the tile ID in the bad dipoles structure) is a string representing a decimal number, instead of an integer value.



Get telescope configuration for a given observation

eg, http://ws.mwatelescope.org/metadata/con?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/con?filename=1095675784_20140925102450_gpubox23_01.fits 

This service takes an observation ID, in gpsseconds, and returns a hierarchical structure (as a string in JSON format) that contains every detail about the configuration of the array at the time of that observation (the value passed can actually be any time in gpsseconds, it doesn't have to be the start time of an actual observation). The time can be passed as obs_idobsid or reftime parameter, all are equivalent. If you only want a summary of the configuration (to know whether the array is in 'PHASE1', 'COMPACT' or 'LB' configuration) then pass the 'summary' parameter in the URL.

If an observation ID more than one week in the past is queried, the details are cached on the server, to speed up subsequent queries about the same object. Observations in the future, or less than a few days old, will have details in the database change as tiles are flagged or observation logs are analysed, so it's not worth saving the data in the query cache.

If you pass 1 to the pretty parameter, than the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed, then the results are not indented.

If you are making a query, and you DON'T want the results taken from the cache (you want them to be read directly from the database) than add the nocache parameter to your query. Note that this can be hundreds of times slower than using the cached data, so this parameter should be used rarely.

{

"11": { "id": 11 "receiver": 1, "slot": 1, "bf": 11, "flagged": null, "bfgainx": 6.0, "dgains": [ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,367,362,354,339,312,270, 219,173,140,123,115,108,100,91,83,78,76,78,80,82,82,81,80,79,80,82,85,88,89,89,88,87,86,87,89,91,92,92,92,91,89,89,88,89,90,91, 91,90,89,87,86,85,85,85,85,85,85,84,83,81,80,78,78,77,77,77,77,76,74,73,71,70,69,69,69,68,68,67,66,65,64,64,64,64,64,65,65,65, 64,64,64,65,65,66,67,67,68,68,69,70,71,72,73,74,75,76,77,77,78,79,80,82,83,84,85,86,87,88,89,90,92,93,95,97,99,100,102,104,106, 108,110,113,116,119,121,124,127,130,133,136,140,145,149,154,158,161,165,168,172,175,179,182,186,189,193,196,200,204,207, 211,214,218,221,225,228,232,235,238,240,241,243,245,247,250,253,255,258,260,261,262,262,263,264,267,270,274,278,282,285, 289,293,298,304,311,318,325,332,338,343,348,352,355,358,361,363,365,366,367,368,368 ], "catten": 18.0, "ted": -656.139138187221, "bfgainy": 6.0, "pos": [ -149.785, 265.814 ], "inputnum": 44, "altitude": 377.011, "flavor": "RG6_90", }, "12": { "id": 12 "receiver": 1, "slot": 2, "bf": 12, "flagged": null, "bfgainx": 6.0, ... }



The structure is a dictionary, with tile ID as a string and an entry for every tile. Each entry is another dictionary, containing data about that tile - the connectivity (receiver number, receiver slot, and correlator 'inputnum'), location ('pos' is a tuple containing east/north in metres, 'alt' is the altitude in metres), and cable data (digital gain multipliers, total tile electrical delay ('ted'), cable and beamformer attenuation). 



Get a list of the last N and next N observations in the schedule, as of the time the service is called

eg, https://ws.mwatelescope.org/metadata/schedstatus?html

This service lets the caller find out what the telescope is doing 'now'. By default, it returns a JSON structure containing a full observation record for each of the last 10 and next 10 observations in the schedule. The current observation will be marked (in colour in the HTML, or with the current=True attribute in JSON results.

Additional options are:

  • num_rows - the total number of observations to return (half before the current time, half after the current time, plus whatever observation, if any, is currently being observed).

  • html - if this option is present, a human-readable HTML page is returned instead of a JSON structure

  • inverse - if this option is present, the colour scheme of the HTML page will be light-on-dark instead of dark-on-light.

  • refresh - integer value in seconds. If this option is given, along with the html option, then the HTML output will include an HTML refresh tag with the given refresh time.

  • desc - if present, any output (HTML or JSON) will be in reverse order (most recent first).

  • terse - if present, JSON output will only contain a few fields per observation (starttime, stoptime, projectid, current, vcsmode, errorstring, obsname).

  • pretty - if present, JSON output will include whitespace to make it more human readable (also happens by default if the request is from a web browser).



[ { "starttime": 1336950984, "stoptime": 1336951056, "projectid": "C001", "current": false, "vcsmode": false, "errorstring": "Bad pointing:\n rec02:[Tile131,Tile132,Tile133,Tile138]\n rec03:[LBF1,LBF2,LBF3,LBF4,LBF5,LBF6,LBF7,LBF8]\n rec04:[Tile032,Tile033]\n rec06:[Tile141,Tile144,Tile145,Tile147,Tile148]\n rec08:[LBB3,LBB6,LBB7]\n rec09:[LBD3,LBD7]\n rec10:[Tile103,Tile104,Tile105,Tile107,Tile108]\n rec11:[Tile111,Tile113,Tile115,Tile116,Tile117,Tile118]\n rec12:[Tile121,Tile125,Tile126,Tile127,Tile128]\n rec13:[LBE3,LBE7,LBE8]\n rec14:[LBC7]\n rec16:[Tile162,Tile163,Tile164,Tile166,Tile167]\n rec17:[LBG6]\n", "obsname": "Dipole11_0_Delays32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32_Ch100" },

...


{ "starttime": 1338920944, "stoptime": 1338921064, "projectid": "G0084", "current": false, "vcsmode": false, "errorstring": "", "obsname": "Riseley_2022A_Abell_3667_Ch235" } ]

Get a structure summarising the current telescope health.

eg. http://ws.mwatelescope.org/metadata/tile_health

 

This service will return a JSON dictionary, these entries:

  • obs_id - The observation ID of the recent observation analysed.

  • good_tiles - The number of unflagged tiles without pointing or other errors during that observation.

  • total_tiles - The total number of tiles configured to be part of the MWA at the time of the observation.

  • bad_states - List of tiles where the receiver state is wrong (implying a receiver is offline).

  • bad_pointings - List of tiles with pointing errors in this observation.

  • bad_freqs - List of tiles with incorrect coarse channel setting in the receiver.

  • bad_gains - List of tiles with incorrect analogue attenuation in the receiver.

  • bad_beamshape - List of tiles with two or more bad dipoles in the same polarisation.

  • bad_flagged - List of manually flagged tiles in the tile_flags table.

  • all_tiles - List of all configured tiles.

  • bad_tiles - List of all tiles that are bad for any reason (in one or more of the above lists).

 

{
"obs_id": 1415602768,
"num_good_tiles": 96,
"num_total_tiles": 144,
"bad_states": [
131,
132,
133,
134,
135,
136,
137,
138,
141,
142,
143,
144,
145,
146,
147,
148,
51,
52,
53,
54,
55,
56,
57,
58,
101,
102,
103,
104,
105,
106,
107,
108
],
"bad_pointings": [
2008,
121,
112,
2022
],
"bad_freqs": [],
"bad_gains": [],
"bad_beamshape": [
128,
2021,
2009,
2012,
127
],
"bad_flagged": [
121,
2018,
2020,
2022,
2023,
2024,
2028,
2029,
2030,
2008,
2009
],
"all_tiles": [
105,
72,
71,
76,
75,
74,
152,
162,
57,
56,
1021,
106,
103,
78,
1012,
1014,
1015,
1013,
1011,
1009,
1024,
1023,
1020,
1019,
1018,
137,
135,
124,
168,
54,
146,
143,
77,
161,
58,
53,
51,
1016,
1010,
1022,
1017,
2056,
2055,
2054,
2053,
2052,
2051,
2050,
2049,
2048,
2047,
2046,
2045,
2044,
2043,
2042,
2041,
108,
107,
104,
73,
154,
153,
151,
138,
133,
132,
131,
111,
118,
117,
116,
115,
113,
128,
126,
125,
122,
121,
165,
164,
163,
55,
145,
144,
142,
141,
102,
101,
158,
157,
156,
155,
136,
134,
114,
112,
127,
123,
167,
166,
52,
148,
147,
2008,
2007,
2006,
2005,
2004,
2003,
2002,
2001,
2016,
2015,
2014,
2013,
2012,
2011,
2010,
2009,
2032,
2031,
2030,
2029,
2028,
2027,
2026,
2025,
2040,
2039,
2038,
2037,
2036,
2035,
2034,
2033,
2024,
2023,
2022,
2021,
2020,
2019,
2018,
2017
],
"bad_tiles": [
128,
131,
132,
133,
134,
135,
136,
137,
138,
141,
142,
143,
144,
145,
146,
147,
148,
51,
52,
53,
54,
55,
56,
57,
58,
2008,
2009,
2012,
2018,
2020,
101,
102,
103,
104,
105,
106,
107,
108,
2022,
2021,
2023,
112,
2024,
2028,
2029,
2030,
121,
127
]
}

For a given observation, get a structure summarising the observation data, and whether it is ready to be processed

eg. http://ws.mwatelescope.org/metadata/data_ready/?obs_id=1336930080

Where:

  • obs_id is an observation ID you wish to determine the data status for (or you can instead pass the name of any data file, with the filename option instead of an obsid). If not provided, the most recent observation will be used instead (this includes observations that are still in progress).

This service will return a JSON dictionary, with four entries:

  • dataready - True if the observation is ready to process or download from ASVO (all data files recorded are in storage at Pawsey).

  • num_data_files - total number of data files recorded for this observation (some or all may not have made it to Pawsey yet, and some or all might have since been deleted).

  • num_data_files_archived - the number of data files for this observation actually present in the MWA archive, now.

  • good_tiles - The number of unflagged tiles without pointing or other errors during that observation.

  • total_tiles - The total number of tiles configured to be part of the MWA at the time of the observation.

  • files - a JSON dict containing all data files, with filename as key, and a dict with filetype, size, source host name, site_path, remote_archived and deleted as fields.



{ "dataready": true, "num_data_files": 24, "num_data_files_archived": 24, "files": { "1336930080_1336930080_128.sub": { "filetype": 17, "size": 5605380096, "host": "mwax13", "site_path": "", "remote_archived": true, "deleted": false }, "1336930080_1336930080_188.sub": { "filetype": 17, "size": 5605380096, "host": "mwax14", "site_path": "", "remote_archived": true, "deleted": false },

...


"1336930080_1336930080_177.sub": { "filetype": 17, "size": 5605380096, "host": "mwax16", "site_path": "", "remote_archived": true, "deleted": false } } }

Convert times/dates between UTC strings and GPS seconds values

eg, http://ws.mwatelescope.org/metadata/tconv?gpssec=1096952256 or http://ws.mwatelescope.org/metadata/tconv/?utciso=2014-10-10T04:57:20  

This service translates between UTC times (as an ISO format string) and times in 'GPS seconds' - seconds since the GPS epoch, without any leap seconds. The parameters are:

  • gpssec: An integer number, the time in GPS seconds, e.g. 1096952256. An ISO format time string is returned.

  • utciso: An ISO format date/time string in UTC - e.g. "2014-10-10T04:57:20". The 'T' separating the date and time parts can be replaced by a space character, but if so it must be URL encoded ('%20').

Get beamformer temperatures for a given observation ID

e.g. http://ws.mwatelescope.org/metadata/temps/?starttime=1174096840 

This service takes a time in gpsseconds (typically an observation ID) and returns a structure indexed by the tile ID, giving the tile name, the receiver ID (1-16), the slot ID (1-8) and the beamformer temperature in degrees C for that beamformer at the given time (actually the average of all measurements over the next 5 minutes after the given time).

Note that the beamformer temperatures are only actually read from the beamformer when a pointing command is sent (at the start of each observation), so if you specify a time in between observations, the vlaues will be stale - possibly many hours old. A temperature value of 'None' indicates communications errors with the tile, showing that no reading was returned.

The parameters are:

  • starttime: An integer time in GPS seconds, typically the starttime of an observation.

If you pass 1 to the pretty parameter, than the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed, then the results are not indented.



Delete the server-side cache entries associated with a given observation ID

eg, http://ws.mwatelescope.org/metadata/invalcache?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/invalcache?filename=1095675784_20140925102450_gpubox23_01.fits 

Deletes the data cached on the web server about a given observation, so that the next query will re-load the data from the SQL database.  The observation can be specified by passing either an observation ID (starttime in GPS seconds) with the obs_id or obsid parameter, or by passing the full name of a data file recorded by that observation using the filename parameter.



Get all of the data files associated with a given observation ID

eg, http://ws.mwatelescope.org/metadata/data_files?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/data_files?filename=1095675784_20140925102450_gpubox23_01.fits 

This service returns details about a single observation. The observation can be specified by passing either an observation ID (starttime in GPS seconds) with the obs_id or obsid parameter, or by passing the full name of a data file recorded by that observation using the filename parameter.

The parameters are:

  • obs_id: An observation ID (GPS start time in seconds)

  • filename: One data file name associated with anobservation, instead of an obs_id

  • mintime: Minimum data file timestamp, as an integer GPS second value. Only works for VCS observations.

  • maxtime: Maximum data file timestamp, as an integer GPS second value. Only works for VCS observations.

  • filetype_id: If supplied, return only files of this integer type code.

  • pretty1 to have the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed (the default), then the results are not indented.

  • location: Integer - if supplied, only return files in this location. Here 2 is Acacia, 3 is Banksia.

  • all_files: If supplied, and True (1, y, Y, true, True, etc) then include files that have been deleted, or not yet archived at Pawsey, otherwise omit them from the file list.

  • terse: If supplied, and True (1, y, Y, true, True, etc) then only return the bucket, folder and filename for each file, instead of the full list of attributes.

  • max_files: Integer - if supplied, limit the number of file structures returned to the value given.

Note that mintime is inclusive (>=), while maxtime is not inclusive (<), like Python ranges.

Example output is:



Get MWA project information for a given project ID or observation

eg, http://ws.mwatelescope.org/metadata/project?obs_id=1096952256 or http://ws.mwatelescope.org/metadata/project?project_id=G0002 

This service returns details about a single MWA project. You can either pass a project ID code (eg G0008), or you can specify a single observation (by passing either an observation ID (starttime in GPS seconds) with the obs_id or obsid parameter, or by passing the full name of a data file recorded by that observation using the filename parameter).

The parameters are:

  • obs_id: An observation ID (GPS start time in seconds)

  • filename: One data file name associated with anobservation, instead of an obs_id

  • project_id: MWA project ID code, eg G0008.

  • pretty1 to have the JSON results are indented to make them more human readable (the default when a GUI web browser is used to make the query). If 0 is passed (the default when called by a script), then the results are not indented.



Example output is:



Related pages