codes:accessfunctions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| codes:accessfunctions [2015/10/13 13:29] – [getUV] jlsolano | codes:accessfunctions [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== ACCESS FUNCTIONS ====== | ||
| - | **Definition of the access functions that are developed in [[http:// | ||
| - | There is [[codes: | ||
| - | **For security purposes user authentication has been added to this tools.** | ||
| - | Examples of connections in [[codes: | ||
| - | ---- | ||
| - | ===== FUNCTION TABLE ===== | ||
| - | |||
| - | ^ Function ^ Short Description ^ Long Description ^Link ^ | ||
| - | ^ getETC | ||
| - | ^ getDS | Returns the DS measures of a brewer for a date | ||
| - | ^ getDSinterval | ||
| - | ^ getZS | Returns the ZS measures of a brewer for a date | ||
| - | ^ getSL | Returns the SL measures of a brewer for a date | ||
| - | ^ getConfigbyDate | ||
| - | ^ getDSS | ||
| - | ^ getZSS | ||
| - | ^ getSLS | ||
| - | ^ getHG | Returns the mercury lamp tests of a brewer for a date | ||
| - | ^ getFileStatus | ||
| - | ^ getUmkehr | ||
| - | ^ getBfileAvailable | ||
| - | ^ getHGInterval | ||
| - | ^ getUV | Returns the UV measures for a specific scantype | ||
| - | ^ getUVAvailableScanTypes | ||
| - | ^ getUVR | ||
| - | ^ getAVG | ||
| - | ^ getComment | ||
| - | ^ getLastComments | ||
| - | ^ getL1 | Returns the L1 calculated measurees of a brewer for a range of dates | ||
| - | |||
| - | ---- | ||
| - | ===== Descriptions ===== | ||
| - | ==== getETC ==== | ||
| - | * Function: getETC | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | * Outputs: A list of (brewerid, date(' | ||
| - | ==== getDS ==== | ||
| - | * Function: getDS | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the DS measures with some extra fields as temperature or number of summary for a day. | ||
| - | ==== getDSinterval ==== | ||
| - | * Function: getDSinterval | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: start date(' | ||
| - | - enddate: end date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the DS measures with some extra fields as temperature or number of summary for the whole range of dates. | ||
| - | ==== getZS ==== | ||
| - | * Function: getZS | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A dictionary with the ZS measures that for a brewer and a day. The key is the datetime(' | ||
| - | ==== getSL ==== | ||
| - | * Function: getSL | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A dictionary with the SL measures that for a brewer and a day. The key is the datetime(' | ||
| - | ==== getConfigbyDate ==== | ||
| - | * Function: getConfigbyDate | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A dictionary with the available Configuration for a brewer and a day formed by pairs of < | ||
| - | ==== getDSS ==== | ||
| - | * Function: getDSS | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the DS summaries for a day. | ||
| - | ==== getZSS ==== | ||
| - | * Function: getZSS | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the ZS summaries for a day. | ||
| - | ==== getSLS ==== | ||
| - | * Function: getSLS | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the SL summaries for a day. | ||
| - | ==== getHG ==== | ||
| - | * Function: getHG | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the mercury lamp test for a day. | ||
| - | ==== getFileStatus ==== | ||
| - | * Function: getFileStatus | ||
| - | * Inputs: | ||
| - | - file: Name of the file for status check | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | - enddate: end date(' | ||
| - | * Outputs: A list where the first element is a list with the fields and the rest are the status of a file with full information if file is provided or a short information with file name, process time and status for all the files between dates. | ||
| - | ==== getUmkehr ==== | ||
| - | * Function: getUmkehr | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Outputs: A list where the first element is the list of measure fields and the rest of them are the umkehr measures for a day from the B files. | ||
| - | ==== getBfileAvailable ==== | ||
| - | * Function: getBfileAvailable | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - year: date(' | ||
| - | * Outputs: A list whit the dates of the received B files in Eubrewnet. | ||
| - | ==== getHGInterval ==== | ||
| - | * Function: getHGInterval | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: start date(' | ||
| - | - date: end date(' | ||
| - | * Outputs: A list where first element is a list with the field names of the HG tests and the rest are the different measures between date and enddate. | ||
| - | ==== getUV ==== | ||
| - | * Function: getUV | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | - scantype: measures will be filtered by a specific scan type | ||
| - | * Outputs: A list where each element is a list. The different lists come in a row and can be grouped by fives. By this way, the information contained in the lists is related bellow: | ||
| - | - Header information (scan, brewerid, integration time, dead time, number of cycles, location, latitude, longitude, temperature, | ||
| - | - Minutes since 00:00 AM | ||
| - | - Wavelengths in Angstroms | ||
| - | - Micrometer steps | ||
| - | - Raw counts | ||
| - | - Irradiances in mW/ | ||
| - | - Diffey-weighted UV irradiance in mW/m² | ||
| - | ==== getUVAvailableScanTypes ==== | ||
| - | * Function: getUVAvailableScanTypes | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Output: A list with the different types of scans for the given brewer and date. | ||
| - | ==== getUVR ==== | ||
| - | * Function: getUVR | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: date(' | ||
| - | * Output: A list with three lists, where the first list contains the brewerid and the date of the UVR file. The second and third lists contain pairs of wavelength and responsivity. | ||
| - | ==== getAVG ==== | ||
| - | * Function: getAVG | ||
| - | * Inputs: | ||
| - | - avg: Average name (apnavg, apoavg...) | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: start date(' | ||
| - | - date: end date(' | ||
| - | * Outputs: A list where first element is a list with the field names of the AVG file and the rest are the different measures between date and enddate if both are defined, only from date if enddate is not defined. | ||
| - | |||
| - | The list of available AVGS access functions is: | ||
| - | |||
| - | ^ File ^ Table definition ^ Access function ^ | ||
| - | | apnavg | [[http:// | ||
| - | | apoavg | [[http:// | ||
| - | | dtnavg | [[http:// | ||
| - | | dtoavg | [[http:// | ||
| - | | fmnavg | [[http:// | ||
| - | | fmoavg | [[http:// | ||
| - | | h2oavg | [[http:// | ||
| - | | hgoavg | [[http:// | ||
| - | | mioavg | [[http:// | ||
| - | | nonavg | [[http:// | ||
| - | | opavg | [[http:// | ||
| - | | ozoavg | [[http:// | ||
| - | | rsnavg | [[http:// | ||
| - | | rsoavg | [[http:// | ||
| - | | scoavg | [[http:// | ||
| - | | slnavg | [[http:// | ||
| - | | sloavg | [[http:// | ||
| - | | uvoavg | [[http:// | ||
| - | | fioavg | [[http:// | ||
| - | ==== getComment ==== | ||
| - | * Function: getComment | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: start date(' | ||
| - | - date: end date(' | ||
| - | * Outputs: A list where first element is a list with the field names of the Parsed Comments file and the rest are the comments of the B files between date and enddate if both are defined, only from date if enddate is not defined. | ||
| - | ==== getLastComments ==== | ||
| - | * Function: getLastComments | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - limit: Limit of the results | ||
| - | * Outputs: A list where first element is a list with the field names of the Parsed Comments file and the rest are the last comments of the B files. They are limited by default to five comments. | ||
| - | ==== getL1 ==== | ||
| - | * Function: getL1 | ||
| - | * Inputs: | ||
| - | - brewerid: Id of Brewer | ||
| - | - date: start date(' | ||
| - | - enddate: end date(' | ||
| - | * Outputs: A list where the first element is the list of parameters and the rest of them are the L1 calculated | ||
| - | * A example of product can be found in [[http:// | ||
| - | |||
| - | ---- | ||
| - | ===== EXAMPLES ===== | ||
| - | ==== MATLAB 2013A ==== | ||
| - | A [[http:// | ||
| - | <code matlab |t get_dss_auth.m> | ||
| - | extern> http:// | ||
| - | </ | ||
| - | |||
| - | ==== MATLAB 2015A ==== | ||
| - | <code matlab |t Example for Matlab 2015a> | ||
| - | %% to get data in matlab (2015) | ||
| - | % brewer thesaloniki #005 | ||
| - | % date 2015-05-10 | ||
| - | % Level 1: | ||
| - | |||
| - | url2=' | ||
| - | |||
| - | wop=weboptions(' | ||
| - | |||
| - | [data_json]=webread(url2, | ||
| - | |||
| - | header=data_json{1} | ||
| - | |||
| - | table_dss=cell2table(cat(1, | ||
| - | </ | ||
| - | |||
| - | ==== PYTHON ==== | ||
| - | A [[http:// | ||
| - | <code python |t connect_example.py> | ||
| - | extern> http:// | ||
| - | </ | ||
codes/accessfunctions.1444742943.txt.gz · Last modified: 2015/10/13 13:29 by jlsolano