User Tools

Site Tools


codes:accessfunctions

This is an old revision of the document!


ACCESS FUNCTIONS

Definition of the access functions that are developed in Eubrewnet There is Table with a summary of the available functions and their links as example.

For security purposes user authentication has been added to this tools. Examples of connections in matlab and python are provided for understanding.


FUNCTION TABLE

Function Short Description Long Description Link
getETC Returns the ETC on Ozone ratio from ICFS getETC Get ETC
getDS Returns the DS measures of a brewer for a date getDS Get DS
getDSinterval Returns the DS measures of a brewer for a range of dates getDSinterval Get DSinterval
getZS Returns the ZS measures of a brewer for a date getZS Get ZS
getSL Returns the SL measures of a brewer for a date getSL Get SL
getConfigbyDate Returns the available Configuration of a brewer for a date getConfigbyDate Get Config by Date
getDSS Returns the DS summaries of a brewer for a date getDSS Get DSS
getZSS Returns the ZS summaries of a brewer for a date getZSS Get ZSS
getSLS Returns the SL summaries of a brewer for a date getSLS Get SLS
getHG Returns the mercury lamp tests of a brewer for a date getHG Get HG
getFileStatus Returns the status of the received files getFileStatus Get FileStatus
getUmkehr Returns the Umkehr measures for a date getUmkehr Get Umkehr
getBfileAvailable Returns the available B files for a year getBfileAvailable Get BfileAvailable
getHGInterval Returns the HG tests for an interval getHGInterval Get HG Interval
getUV Returns the UV measures for a specific scantype getUV Get UV
getUVAvailableScanTypes Returns the UV available types of scan getUVAvailableScanTypes Get UV Available Scan Types
getUVR Returns the available UVR for a date getUVR Get UVR
getAVG Returns the available AVG measure for a brewer in a date interval getAVG Get AVG
getComment Returns the comments of a brewer in a date interval getComment Get Comment
getLastComments Returns the last comments of a brewer getLastComments Get Last Comments
getL1 Returns the L1 calculated measurees of a brewer for a range of dates getL1 Get L1

Descriptions

getETC

  • Function: getETC
  • Inputs:
    1. brewerid: Id of Brewer
  • Outputs: A list of (brewerid, date('YYYY-MM-DD'), etc) that comes from the ICF that are stored in the Eubrewnet Database.

getDS

  • Function: getDS
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. date: start date('YYYY-MM-DD') of the range of measures
    3. enddate: end date('YYYY-MM-DD') of the range of measures
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • Outputs: A dictionary with the ZS measures that for a brewer and a day. The key is the datetime('YYYY-MM-DD HH:MM:SS') and the value is a dictionary formed by pairs of <value name, value>.

getSL

  • Function: getSL
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • Outputs: A dictionary with the SL measures that for a brewer and a day. The key is the datetime('YYYY-MM-DD HH:MM:SS') and the value is a dictionary formed by pairs of <value name, value>.

getConfigbyDate

  • Function: getConfigbyDate
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the available configuration
  • Outputs: A dictionary with the available Configuration for a brewer and a day formed by pairs of <constant name, constant value>. The available configuration is the last configuration stored or the information of the header of the bfile for that day.

getDSS

  • Function: getDSS
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. file: Name of the file for status check
    2. brewerid: Id of Brewer
    3. date: date('YYYY-MM-DD') or start date if end date is provided
    4. enddate: end date('YYYY-MM-DD') of the date range
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. year: date('YYYY')
  • Outputs: A list whit the dates of the received B files in Eubrewnet.

getHGInterval

  • Function: getHGInterval
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: start date('YYYY-MM-DD') of the period of tests
    3. date: end date('YYYY-MM-DD') of the period of tests
  • 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:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
    3. 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:
    1. Header information (scan, brewerid, integration time, dead time, number of cycles, location, latitude, longitude, temperature, pressure, darkcount and minutes for first measure) as related in Brewer Operator Manual
    2. Minutes since 00:00 AM
    3. Wavelengths
    4. Micrometer steps
    5. Raw counts

getUVAvailableScanTypes

  • Function: getUVAvailableScanTypes
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the measures
  • Output: A list with the different types of scans for the given brewer and date.

getUVR

  • Function: getUVR
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: date('YYYY-MM-DD') of the available responsivity file
  • 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:
    1. avg: Average name (apnavg, apoavg…)
    2. brewerid: Id of Brewer
    3. date: start date('YYYY-MM-DD') of the measures
    4. date: end date('YYYY-MM-DD') of the measures
  • 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:

getComment

  • Function: getComment
  • Inputs:
    1. brewerid: Id of Brewer
    2. date: start date('YYYY-MM-DD') of the measures
    3. date: end date('YYYY-MM-DD') of the measures
  • 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:
    1. brewerid: Id of Brewer
    2. 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:
    1. brewerid: Id of Brewer
    2. date: start date('YYYY-MM-DD') of the range of measures
    3. enddate: end date('YYYY-MM-DD') of the range of measures
  • Outputs: A list where the first element is the list of parameters and the rest of them are the L1 calculated measures (see Eubrewnet Products Generation) for the whole range of dates.

EXAMPLES

MATLAB

A matlab function is available for users for understanding the Authentication method.

|t get_dss_auth.m
extern> http://rbcce.aemet.es/svn/matlab/get_dss_auth.m

PYTHON

A python script is available for users for understanding the Authentication method.

|t connect_example.py
extern> http://rbcce.aemet.es/svn/python/connect_example.py
codes/accessfunctions.1443702933.txt.gz · Last modified: 2015/10/01 12:35 by bhcruz