JMMC/ObsPortal: Data analysis 
 Astroquery 
- https://astroquery.readthedocs.io/en/latest/
- https://astroquery.readthedocs.io/en/latest/eso/eso.html
It seems that there is no API to query the ESO archive. Astroquery uses the library 
BeautifulSoup to parse HTML pages of ESO archive website, extract content and aggregate data into a 
"tabular" structure. 
The search seems to fill the forms. So, it is possible to filter results on some properties (instrument name, target name, category (science, calibrator, ...), observation ID, program ID, ...). The headers related to a query result can be retrieved but it is necessary to use a list of 'dp_id'
 AsproX / ESO archive 
It is relatively easy to generate an Asprox file from one line extracted from the ESO archive (one OBS_ID for a defined instrument), but some informations must be "translated" to fill the related XML tags. However, the reversed way (from Aspro to ESO Arch.) is another work... : the Aspro UI lacks of fields for 'program ID' or 'observation ID' and we have to define how to identify the ESO data from the parameters entered in the UI.
 Notes from meeting with Gilles (2019-11-19) 
 
-  Main goal of Aspro: to help astronomers/scientists to prepare their proposals.
-  Observation = what (targets, calibrators), when, where/how (interferometer, instrument parameters) 
-  planned / to do
-  done (extracted from ESO, OIDB, ...)
 
-  From one ProgID, it may be possible to find the calibrator associated to a target because a standard observation follow the sequence : Calibrator. Science, Calibrator 
-  Need to check also if the information is given by a keyword in a header file.
 
 Data model / Mapping 
This gathers the unified data model from OiDB, ASPRO2 and ESO logs:
 Identifiers 
Many identifiers are existing: program id, observation id, container id (p2), PI, proposal id ...
TODO:
HIERARCH ESO OBS PROG ID   0103.C-0347(C)   ESO program identification
container id ?
HIERARCH ESO OBS CONTAINER ID   2438869   Scheduling container ID
 Object 
 
-  Name: object name (text) 
-  asprox: target/name
-  obxml: target/name
-  oidb: target_name
-  eso: keyword 'HIERARCH ESO OBS TARG NAME', not 'OBJECT' (less reliable)
 
-  type: SCIENCE/CALIBRATOR 
-  asprox: based on targetUserInfos/calibrators group
-  obxml: observationConfiguration/type = 'SCIENCE' or 'CALIBRATION'
-  oidb: Missing
-  eso: keyword 'HIERARCH ESO DPR CATG' = 'SCIENCE' or 'CALIB'
 
-  coordinates (in FK5 J2000) 
-  asprox: target/RA target/DEC (sexagesimal): 02:36:37.9182097570 +12:26:51.459132329
-  obxml: target/RA target/DEC (sexagesimal)
-  oidb: s_ra / s_dec (deg) displayed in sexagesimal format
-  eso: keywords 'RA' / 'DEC' (deg), check EQUINOX = 2000 and RADECSYS='FK5'
 
 Interferometer setup 
This describes the interferometer parameters: facility (VLTI / CHARA ...), baselines (+ pops, beams), AO (naomi ...) 
-  Observatory: 
-  asprox: interferometerConfiguration/name (start) like 'VLTI Period 105'
-  obxml: interferometerConfiguration/name
-  oidb: facility_name
-  eso: 'VLTI' (hard-coded)
 
-  Period (eso like): 
-  asprox: interferometerConfiguration/name (end) like 'VLTI Period 105'
-  obxml: interferometerConfiguration/version
-  oidb: Undefined
-  eso: keyword 'HIERARCH ESO OBS PROG ID' (start) like '0103.C-0347(C)' corresponds to Period 103
 
-  Configuration: 2T, 3T, 4T (VLTI) and 5T, 6T (CHARA) 
-  asprox: instrumentConfiguration/stations + variant/stations like 'A0 G1 J2 K0' (based on internal dictionary // eso offered configurations)
-  obxml: interferometerConfiguration/stations (same format) + A2P2 maps given values into P2 (small, medium, large configurations from P104)
-  oidb: telescope_configuration (never filled in obsCore extension)
-  eso: keyword 'HIERARCH ESO OBS BASELINE' like 'A0-G1-J2-J3' (reliable ?)
 
TODO: describe AO settings (type, mode) in asprox / obxml
Extra parameters: 
-  obxml: PoPs (CHARA) / channels (beams) in interferometerConfiguration/pops (PoP1...5) and interferometerConfiguration/pops (V1...V6) (based on internal dictionary)
 Instrument setup 
This describes the instrument parameters: 
 
    
        GRAVITY
        HIGH-COMBINED
    
 observation time: 
  
TODO:
EXPTIME   316.0000000   Integration time
MJD-OBS   58627.07295558   Obs start
DATE-OBS   2019-05-24T01:45:12   Observing date
UTC   6301.000   [s] 01:45:00.000 UTC
LST   47333.932   [s] 13:08:53.932 LST
 UV coverage: 
  
TODO:
 Specific ESO Instrument Mapping rules: 
 GRAVITY 
First priority
TODO: define filtering options (DP_CAT / DP_TYPE values) + extra FIELDS