; docformat = 'rst' ; ; NAME: ; initIDL ; PURPOSE: ; Read Simple Configurations Files for the AstroIM and KOALA suites ; ;+ ; :Description: ; Read Simple Configurations Files for the AstroIM and KOALA ; suites, together with Astronomical Catalogs Utilities ; ; :Categories: ; Configuration ; ; :Returns: A Structure with all the default configuration from a ; software suite (indicated by keywords) ; ; :Examples: ; Load AstroIM configuration from default location (~/.idl/astroim.ini):: ; IDL> config = initIdl() ; ; Load KOALA configuration from local file:: ; IDL> config = initIdl('path_to_file', /KOALA) ; ; :Params: ; FILE: in, optional, type=string ; Path to the Configuration File ; ; :Keywords: ; BASE: in, optional, type=boolean, default=1 ; Trigger reading of the Global AstroIM Configuration File ; REDIM: in, optional, type=boolean, default=0 ; Trigger reading of the Configuration File for REDIM.PRO ; BINARY: in, optional, type=boolean, default=0 ; Trigger reading of the Configuration File for BINARY.PRO ; KOALA: in, optional, type=boolean, default=0 ; Trigger reading of the Configuration File for codes in KOALA suites ; CATALOG: in, optional, type=boolean, default=0 ; Trigger reading of the Configuration File for codes using Asteroids Catalogs ; ; :Uses: ; ; :Author: ; B.Carry (OCA) ; ; :History: ; Change History:: ; Original Version written in September 2013, B. Carry (IMCCE) ; 2013 Sep. - B.Carry (IMCCE) - Added KOALA as possible file ; 2016 Mar. - B.Carry (OCA) - Corrected a bug on redim/first serie ; 2017 June - B.Carry (OCA) - MPCORB + MPCOMET added ;- function initIDL, file, base=base, redIm=redIm, binary=binary, koala=koala, catalog=catalog COMPILE_OPT hidden ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- I -- Variables Declaration and Definition -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--I.1-- Kind of Input File ------------------------------------------------------------------ if keyword_set(BASE) then BASE =1 else BASE =0 if keyword_set(REDIM) then REDIM =1 else REDIM =0 if keyword_set(BINARY) then BINARY =1 else BINARY =0 if keyword_set(KOALA) then KOALA =1 else KOALA =0 if keyword_set(CATALOG) then CATALOG=1 else CATALOG=0 caseVec = [BASE, REDIM, BINARY, KOALA, CATALOG] ;--I.1.1-- Default is Global Configuration File if total(caseVec) eq 0 then begin BASE=1 caseVec=[1,0,0,0,0] endif ;--I.1.2-- Only one File at a Time if total(caseVec) ne 1 then begin print, ' INITIDL: Please select only one kind of configuration file' return, 1 endif ;--I.2-- Check for Input File ---------------------------------------------------------------- if not keyword_set( file ) then begin inVec = ['~/.idl/astroim.ini', $ '~/.idl/redim.ini', $ '~/.idl/binary.ini', $ '~/.idl/koala.ini', $ '~/.idl/catalogs.ini' ] file= inVec[where(caseVec eq 1)] endif if not file_test(file,/READ) then begin message, /INFO, 'Configuration file not found: '+strTrim(file,2) return, -1 endif ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- II -- Global Input File for Configuration -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if keyword_set(BASE) then begin ;--II.1-- Open File openr, inputFile, file, /GET_LUN line = ' ' section = ' ' ;--II.2-- Output Variables path = {root: '', $ ;-Root Directory for the Project logs: '', $ ;-Directory of Logs of Observations obs: '' , $ ;-File listing Observatory Specifics ephem: '' } ;-Path to ephemeris directory ext = {fits: '.fits',$ ;-File extension of FITS files dat: '.dat', $ ; File extension of DAT files xml: '.xml', $ ; File extension of XML & VOTABLE files jpg: '.jpg', $ ;-File extension of JPEG files png: '.png', $ ;-File extension of PNG files eps: '.eps' } ;-File extension of Encapsulated Postscript files fmt = {size: 'I04', $ ;-Format for sizes encoding (fortran-like) filter: 'A-4',$ ;-Format for filter encoding (fortran-like) PS: 'F08.6', $ ;-Format for pixel size encoding (fortran-like) DIT: 'F08.3', $ ;-Format for exposure time (DIT) encoding (fortran-like) NDIT: 'I03', $ ;-Format for number of DIT encoding (fortran-like) serie: 'I02', $ ;-Format for indexing series (fortran-like) frame: 'I03', $ ;-Format for indexing frames within a serie (fortran-like) iso: 'A-22', $ ;-Format for Date in ISO format (fortran-like) jd: 'D16.8',$ ;-Format for Date in Julian days (fortran-like) sep: '2x' } ;-Format for field separator (fortran-like) suffix = {sky: '-sky', $ ;-Sufix for sky frames clean: '-clean' , $ ;-Sufix for cleaned frames reduc: '-reduc' , $ ;-Sufix for reduced frames sna: '-sna' , $ ;-Sufix for coadded frames DC: '-DC' , $ ;-Sufix for Digital Coronography sat: '-sat' , $ ;-Sufix for satellite astrometry deconv: '-deconv', $ ;-Sufix for deconvolved frames edge:'-edges' } ;-Sufix for edge detection arrays soft = {redim: '~/.idl/redim.ini', $ ;-Path to REDIM Configuration File binary: '~/.idl/binary.ini', $ ;-Path to BINARY Configuration File koala: '~/.idl/koala.ini' , $ ;-Path to KOALA Configuration File catalog:'~/.idl/catalogs.ini' } ;-Path to CATALOG Configuration File user = {name: 'n.a.', $ ;-User Name inst: 'n.a.' } ;-User Institute while ~EoF(inputFile) do begin readf, inputFile, line ;------------------------------------------------------------ ;--II.3-- Section selection if strMid(line,0,1) eq '[' then begin split = strSplit(line, '[]', /EXTRACT ) section = split[0] ;------------------------------------------------------------ ;--II.4-- Section analysis endif else begin split=strSplit(line, '=,;', /EXTRACT, count=nbField ) key = strTrim(split[0],2) CASE section OF ;------------------------------------------------------------ ;--II.4.1-- Working Directories 'Directories': BEGIN CASE key OF 'root': path.root = strTrim(split[1],2) 'logs': path.logs = strTrim(split[1],2) 'obs': path.obs = strTrim(split[1],2) 'ephem': path.ephem= strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--II.4.2-- Definition of Files Extension 'File Extensions': BEGIN CASE key OF 'extension.fits': ext.fits = strTrim(split[1],2) 'extension.xml' : ext.xml = strTrim(split[1],2) 'extension.dat' : ext.dat = strTrim(split[1],2) 'extension.jpg' : ext.jpg = strTrim(split[1],2) 'extension.png' : ext.png = strTrim(split[1],2) 'extension.eps' : ext.eps = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--II.4.3-- Definition of Suffixes 'File Suffixes': BEGIN CASE key OF 'sufix.sky' : suffix.sky = strTrim(split[1],2) 'sufix.clean' : suffix.clean = strTrim(split[1],2) 'sufix.reduced' : suffix.reduc = strTrim(split[1],2) 'sufix.coadded' : suffix.sna = strTrim(split[1],2) 'sufix.corono' : suffix.DC = strTrim(split[1],2) 'sufix.satellite': suffix.sat = strTrim(split[1],2) 'sufix.deconv' : suffix.deconv = strTrim(split[1],2) 'sufix.edges' : suffix.edge = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--II.4.4-- Definition of Parameters Formats (DIT, PS...) 'Parameter Formats': BEGIN CASE key OF 'format.size' : fmt.size = strTrim(split[1],2) 'format.filter' : fmt.filter= strTrim(split[1],2) 'format.dit' : fmt.dit = strTrim(split[1],2) 'format.ndit' : fmt.ndit = strTrim(split[1],2) 'format.scale' : fmt.ps = strTrim(split[1],2) 'format.serie' : fmt.serie = strTrim(split[1],2) 'format.frame' : fmt.frame = strTrim(split[1],2) 'format.iso' : fmt.iso = strTrim(split[1],2) 'format.jd' : fmt.jd = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--II.4.5-- Different Configuration Files for Softwares 'Software-Specific Configuration': BEGIN CASE key OF 'redim': soft.redim = strTrim(split[1],2) 'binary': soft.binary = strTrim(split[1],2) 'koala': soft.koala = strTrim(split[1],2) 'catalog':soft.catalog= strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--II.4.6-- User 'User': BEGIN CASE key OF 'name': user.name = strTrim(split[1],2) 'inst': user.inst = strTrim(split[1],2) ELSE: ENDCASE END ELSE: ENDCASE endelse endwhile free_lun, inputFile return, {path:path, ext:ext, fmt:fmt, suffix:suffix, soft:soft, user:user } endif ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- III -- Configuration File for REDIM.PRO -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if keyword_set(REDIM) then begin ;--III.1-- Open File openr, inputFile, file, /GET_LUN line = ' ' section = ' ' ;--III.2-- Output Variables mask = {yn: 0, $ ;-Trigger the Cleaning of Bad Pixel in Scientific Frames f: '', $ ;-Name of the file with the thresholds for bad pixel detection u: 0, $ ;-Use default (0) or the user-supplied file (1)? s: [1.,1.], $ ;-Sigma threshold for bad pixel detection w: 7 } ;-Width of window for bad-pixel filtering fringe = {yn: 0, $ ;-Trigger the Cleaning of Fringes in Scientific Frames cp: ''} ;-File with the Coordinates of the Control Pairs stripe= {yn: 0, $ ;-Trigger the Cleaning of Linear Stripes dir: 'none', $ ;-Direction of stripes removal: None | Hor | Vert | Both mode: 'median', $ ;-Level evaluation: Median - Fine samp: 'full', $ ;-Sample to consider: full | sideN where N is an integer for the number of pixels cosmic: 5 } ;-Threshold for cosmic rejection (in unit of sky stddev) sci = {target: 'all', $ ;-Target to process (all, psf, sci) filter: 'all', $ ;-Observing filter to process (all, J, H, K) flat: 'sky', $ ;-Preference for FLAT (sky/dome) sky: 'median', $ ;-Sky evaluation: NoSky - Median - Fine serie: 0 } ;-ID of the first serie align = {refID: 1, $ ;- ID of the Reference Frame (1-based and not 0-based) mode: {man: 0, $ ;- Alignment mode: Manual star: 0, $ ;- Alignment mode: 2D star profile cross: 0}, $ ;- Alignment mode: Frame cross-correlation gui: {size: 768, $ ;- GUI - Size of the Window min: 0., $ ;- GUI - Min value to Show - ADU or % max: 500}, $ ;- GUI - Max value to Show - ADU or % size: 128, $ ;- Size of the Reduced Frame margin: 0.25, $ ;- Security Margin (%) coadd: 1 } ;- Boolean - Trigger Creation of a Shift'n'Add Frame while ~EoF(inputFile) do begin readf, inputFile, line ;------------------------------------------------------------ ;--III.3-- Section selection if strMid(line,0,1) eq '[' then begin split = strSplit(line, '[]', /EXTRACT ) section = split[0] ;------------------------------------------------------------ ;--III.4-- Section analysis endif else begin split=strSplit(line, '=,;', /EXTRACT, count=nbField ) key = strTrim(split[0],2) CASE section OF ;------------------------------------------------------------ ;--III.4.1-- Parameters for Bad-Pixel Mask Creation 'Bad-Pixel Mask': BEGIN CASE key OF 'clean.yn' : mask.yn = round(float(split[1])) 'threshold.file': mask.f = strTrim(split[1],2) 'threshold.user': mask.u = round(float(split[1])) 'threshold.hot' : mask.s[1] = float(split[1]) 'threshold.dead': mask.s[0] = float(split[1]) 'filter.width' : mask.w = round(float(split[1])) ELSE: ENDCASE END ;------------------------------------------------------------ ;--III.4.2-- Parameters for Fringes Mapping and Cleaning 'Fringes': BEGIN CASE key OF 'clean.yn': fringe.yn = round(float(split[1])) 'file' : fringe.cp = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--III.4.3-- Parameters for Stripes Cleaning 'Stripes Cleaning': BEGIN CASE key OF 'clean.yn' : stripe.yn = round(float(split[1])) 'direction': stripe.dir = strLowCase(strTrim(split[1],2)) 'eval.mode': stripe.mode = strLowCase(strTrim(split[1],2)) 'sample' : stripe.samp = strTrim(split[1],2) 'cosmic' : stripe.cosmic= strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--III.4.4-- Parameters for Image Cleaning 'Treatment of Scientific Frames': BEGIN CASE key OF 'target' : sci.target = strTrim(split[1],2) 'filter' : sci.filter = strTrim(split[1],2) 'flat' : sci.flat = strTrim(split[1],2) 'sky' : sci.sky = strTrim(split[1],2) 'first-serie': sci.serie = round(float(split[1])) ELSE: ENDCASE END ;------------------------------------------------------------ ;--III.4.5-- Parameters for Image Alignment 'Image Alignment': BEGIN CASE key OF 'reference.id' : align.refID = round(float(split[1])) 'manAlign' : align.mode.man = strcmp('Y',strTrim(split[1],2),/fold) 'starAlign' : align.mode.star = strcmp('Y',strTrim(split[1],2),/fold) 'crossAlign' : align.mode.cross= strcmp('Y',strTrim(split[1],2),/fold) 'gui.size' : align.gui.size = round(float(split[1])) 'gui.min' : align.gui.min = float(split[1]) 'gui.max' : align.gui.max = float(split[1]) 'reduc.size' : align.size = round(float(split[1])) 'reduc.margin' : align.margin = float(split[1]) 'shift.and.add': align.coadd = round(float(split[1])) ELSE: ENDCASE END ELSE: ENDCASE endelse endwhile free_lun, inputFile return, {mask:mask, fringe:fringe, stripe:stripe, sci:sci, align:align } endif ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- IV -- Configuration File for BINARY.PRO -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if keyword_set(BINARY) then begin ;--IV.1-- Open File openr, inputFile, file, /GET_LUN line = ' ' section = ' ' ;--IV.2-- Output Variables DC = {mode: 'fast', $ ;-Mode of DC radius: 32, $ ;-Maximum search radius bin: 0.5, $ ;-Radial size of the DC annulii sample: 32 , $ ;-Number of sample to interpolate the intersection ring/pixel step: {flux: .10, $ ;-Default step in flux for halo evaluation (% of primary peak) radius: 3 } } ;-Default step in radius for halo evaluation (pixel) while ~EOF(inputFile) do begin readf, inputFile, line ;------------------------------------------------------------ ;--IV.3-- Section selection if strMid(line,0,1) eq '[' then begin split = strSplit(line, '[]', /EXTRACT ) section = split[0] ;------------------------------------------------------------ ;--IV.4-- Section analysis endif else begin split=strSplit(line, '=,;', /EXTRACT, count=nbField ) key = strTrim(split[0],2) CASE section OF ;------------------------------------------------------------ ;--IV.4.1-- Parameters for Digital Coronography 'Digital Coronography': BEGIN CASE key OF 'DC.mode' : DC.mode = strTrim(split[1],2) 'search.radius' : DC.radius = floor(float(split[1])) 'search.bin' : DC.bin = float(split[1]) 'step.flux' : DC.step.flux = float(split[1]) 'step.radius' : DC.step.radius = float(split[1]) 'pix.oversample': DC.sample = round(float(split[1])) ELSE: ENDCASE END ELSE: ENDCASE endelse endwhile free_lun, inputFile return, DC endif ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- V -- Configuration File for KOALA suite -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if keyword_set(KOALA) then begin ;--V.1-- Open File openr, inputFile, file, /GET_LUN line = ' ' section = ' ' ;--V.2-- Output Variables lc = {convex: '', $ ;-LC Generator, convex shapes only concav: '', $ ;-LC Generator, all shapes config: '', $ ;-LC Generator, default diffusion law parameters sampling: 36} ;-LC Generator, default number of points over a rotation occ = {sampling: 50, $ ;-Occ: Number of points in the profile auto: 1 , $ ;-Occ: Automated barycenter search step: 5. , $ ;-Occ: Step in km for barycenter search range: 30. } ;-Occ: Range in km (one-sided) for barycenter search ao = {auto: 1 , $ ;-Img: Automated barycenter search step: 1. , $ ;-Img: Step in km for barycenter search range: 10. } ;-Img: Range in km (one-sided) for barycenter search while ~EOF(inputFile) do begin readf, inputFile, line ;------------------------------------------------------------ ;--V.3-- Section selection if strMid(line,0,1) eq '[' then begin split = strSplit(line, '[]', /EXTRACT ) section = split[0] ;------------------------------------------------------------ ;--V.4-- Section analysis endif else begin split=strSplit(line, '=,;', /EXTRACT, count=nbField ) key = strTrim(split[0],2) CASE strLowCase(section) OF ;------------------------------------------------------------ ;--V.4.1-- Parameters for Lightcurve Generation 'lightcurve utilities': BEGIN CASE strLowCase(key) OF 'convex': lc.convex = strTrim(split[1],2) 'concav': lc.concav = strTrim(split[1],2) 'config': lc.config = strTrim(split[1],2) 'sampling': lc.sampling= strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--V.4.1-- Parameters for Stellar Occultations 'occultation parameters': BEGIN CASE strLowCase(key) OF 'sampling' : occ.sampling = round(float(split[1])) 'center.auto' : occ.auto = round(float(split[1])) 'center.step' : occ.step = float(split[1]) 'center.range': occ.range = float(split[1]) ELSE: ENDCASE END ;------------------------------------------------------------ ;--V.4.2-- Parameters for Disk-Resolved Imaging 'disk-resolved imaging parameters': BEGIN CASE strLowCase(key) OF 'center.auto' : ao.auto = round(float(split[1])) 'center.step' : ao.step = float(split[1]) 'center.range': ao.range = float(split[1]) ELSE: ENDCASE END ELSE: ENDCASE endelse endwhile free_lun, inputFile return, {lc:lc, occ:occ, ao:ao} endif ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; ;--- TAG --- VI -- Configuration File for Catalog Software -----------------------; ;-----------------------------------------------------------------------------------------------; ;-----------------------------------------------------------------------------------------------; if keyword_set(catalog) then begin ;--VI.1-- Open File ------------------------------------------------------------- openr, inputFile, file, /GET_LUN line = ' ' section = ' ' ;--VI.2-- Output Variables ------------------------------------------------------ ;--VI.2.1-- Asteroid Orbits and Discovery Circumstances astorb = '/astrodata/Catalog/ASTORB/astorb.dat' astdys = '/astrodata/Catalog/ASTDYS/' mpcorb = '/astrodata/Catalog/MPC/MPCORB/MPCORB.DAT' mpcomet= '/astrodata/Catalog/MPC/MPCORB/MPCOMET.DAT' disco={mpc: '', $ imcce: ''} eproc= '/astrodata/Catalog/EPROC/' ;--VI.2.2-- Virtual Observatory Tools vo={skybot:'', $ ;-IMCCE VO SkyBoT ephemcc:'', $ ;-IMCCE VO Miriade ephemcc ephemph:'', $ ;-IMCCE VO Miriade ephemph vizier:'' } ;-CDS VizieR Query ;--VI.2.3-- Solar System Objects Density Database ssodd={db: '/astrodata/Catalog/ssodd/ssodd.csv', $ ;-Main table of the Solar System Objects Density Database conf: '/astrodata/Catalog/ssodd/config.ini', $ ;-Main configuration file of the Solar System Objects Density Database mass: '/astrodata/Catalog/ssodd/masses.dat', $ ;-Mass table of the Solar System Objects Density Database diam: '/astrodata/Catalog/ssodd/diameters.dat', $ ;-Diameter table of the Solar System Objects Density Database dens: '/astrodata/Catalog/ssodd/densities.dat', $ ;-Density table of the Solar System Objects Density Database met: '/astrodata/Catalog/ssodd/meteorites.dat', $ ;-Density and Porosity table for meteorites in the Solar System Objects Density Database analog:'/astrodata/Catalog/ssodd/analogs.dat', $ ;-Taxonomy and Analog Meteorite table for the Solar System Objects Density Database link: '/astrodata/Catalog/ssodd/links.dat' } ;-Asteroid-Meteorite Links table for the Solar System Objects Density Database ;--VI.2.4-- Surface properties surface={taxo: '/astrodata/Catalog/Taxonomy/2009-Bus-DeMeo/', $ ;-Bus-DeMeo taxonomy aams: '/astrodata/Catalog/HG12/aams.dat', $ ;-Helsinki AbsMag and Slope sdss: '/astrodata/Catalog/Taxonomy/', $ ;-SDSS MOC movis:'/astrodata/Catalog/Taxonomy/' } ;-MOVIS catalogs from Popescu et al. 2016 ;--VI.2.5-- Planetary Data System pds= {triad: '/astrodata/Catalog/PDS/EAR_A_COMPIL_5_TRIADRAD_V1_0/data/', $ ;-TRIAD Radiometric Diameters and Albedos: http://sbn.psi.edu/pds/resource/triadrad.html iras: '/astrodata/Catalog/PDS/IRAS_A_FPA_3_RDR_IMPS_V6_0/data/', $ ;-IRAS Minor Planet Survey (IMPS): http://sbn.psi.edu/pds/resource/imps.html msx: '/astrodata/Catalog/PDS/MSX_A_SPIRIT3_5_SBN0003_MIMPS_V1_0/data/', $ ;-MSX Infrared Minor Planet Survey (MIMPS): http://sbn.psi.edu/pds/resource/mimps.html occ: '/astrodata/Catalog/PDS/EAR_A_3_RDR_OCCULTATIONS_V14_0/data/', $ ;-Asteroid Occultations: http://sbn.psi.edu/pds/resource/occ.html lcparam: '/astrodata/Catalog/PDS/EAR_A_5_DDR_DERIVED_LIGHTCURVE_V15_0/data/',$ ;-Lightcurve Derived Data: http://sbn.psi.edu/pds/resource/lc.html taxo: '/astrodata/Catalog/Taxonomy/EAR_A_5_DDR_TAXONOMY_V6_0/data/', $ ;-Asteroid Taxonomy: http://sbn.psi.edu/pds/resource/taxonomy.html binary: '/astrodata/Catalog/PDS/EAR_A_COMPIL_5_BINMP_V9_0/data/', $ ;-Binary Minor Planet: http://sbn.psi.edu/pds/resource/binmp.html acs2MASS: '/astrodata/Catalog/PDS/EAR_A_I0054_I0055_5_2MASS_V2_0/data/'} ;-2MASS Asteroid and Comet Survey: http://sbn.psi.edu/pds/resource/2mass.html ;--VI.2.x-- Tables from Publications, not Available on Usual Repositeries bib={wise: '', $ ;-WISE Diameters -- Masiero/Mainzer/Grav... akari:'', $ ;-AKARI Diameters -- Usui et al. 2011/2013 iras: ''} ;-IRAS/MSX revision by Ryan and Woodward (2010) while ~EOF(inputFile) do begin readf, inputFile, line ;------------------------------------------------------------ ;--VI.3-- Section selection if strMid(line,0,1) eq '[' then begin split = strSplit(line, '[]', /EXTRACT ) section = strLowCase(strTrim(split[0])) ;------------------------------------------------------------ ;--VI.4-- Section analysis endif else begin split=strSplit(line, '=,;', /EXTRACT, count=nbField ) key = strLowCase(strTrim(split[0],2)) CASE section OF ;------------------------------------------------------------ ;--VI.4.1-- Orbital Parameters 'asteroid orbits': BEGIN CASE key OF 'astorb': astorb = strTrim(split[1],2) 'astdys': astdys = strTrim(split[1],2) 'mpcorb': mpcorb = strTrim(split[1],2) 'mpcomet': mpcomet = strTrim(split[1],2) 'disco.mpc': disco.mpc = strTrim(split[1],2) 'disco.imcce': disco.imcce= strTrim(split[1],2) 'eproc': eproc = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--VI.4.2-- VO WebServices 'vo web services': BEGIN CASE key OF 'skybot' : vo.skybot = strTrim(split[1],2) 'ephemcc': vo.ephemcc= strTrim(split[1],2) 'ephemph': vo.ephemph= strTrim(split[1],2) 'vizier' : vo.vizier = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--VI.4.3-- SSODD Repositery 'solar system objects density database': BEGIN CASE key OF 'ssodd': ssodd.db = strTrim(split[1],2) 'conf': ssodd.conf = strTrim(split[1],2) 'mass': ssodd.mass = strTrim(split[1],2) 'diam': ssodd.diam = strTrim(split[1],2) 'dens': ssodd.dens = strTrim(split[1],2) 'met': ssodd.met = strTrim(split[1],2) 'analog': ssodd.analog= strTrim(split[1],2) 'link': ssodd.link = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--VI.4.4-- Surface Properties 'surface properties': BEGIN CASE key OF 'bus-demeo': surface.taxo = strTrim(split[1],2) 'aams': surface.aams = strTrim(split[1],2) 'sdssmoc': surface.sdss = strTrim(split[1],2) 'movis': surface.movis = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--VI.4.5-- PDS Repositery 'repositery from pds': BEGIN CASE key OF 'triad': pds.triad = strTrim(split[1],2) 'iras': pds.iras = strTrim(split[1],2) 'msx': pds.msx = strTrim(split[1],2) 'occ': pds.occ = strTrim(split[1],2) 'lcparam': pds.lcparam = strTrim(split[1],2) 'taxonomy': pds.taxo = strTrim(split[1],2) 'binary': pds.binary = strTrim(split[1],2) '2mass': pds.acs2MASS = strTrim(split[1],2) ELSE: ENDCASE END ;------------------------------------------------------------ ;--VI.4.x-- Tables from Literature 'tables from literature': BEGIN CASE key OF 'akari': bib.akari = strTrim(split[1],2) 'wise': bib.wise = strTrim(split[1],2) 'iras2010': bib.iras = strTrim(split[1],2) ELSE: ENDCASE END ELSE: ENDCASE endelse endwhile free_lun, inputFile return, {astorb:astorb, astdys:astdys, $ mpc:{mpcorb:mpcorb, mpcomet:mpcomet}, $ eproc:eproc, disco:disco, $ vo:vo, $ pds:pds, $ surface:surface, $ ssodd:ssodd, $ bib:bib} endif end