GAIA simulated spectra from cycle 8.  This is test data for a future
GAIA spectral service.

Handler: Markus, Gregory

This mess is incredibly badly documented.  The GAIA-C2-UG-UB-YI-003-c8.pdf
document contains almost no useful information, so we had to piece
together things from MDB and Gregory's gbin explorer.

Here's what's in the files (some columns may be missing)
:


[FILES: *calibratedspectrum*]
This is where we get the actual "long" spectra from.
- cutIndex
- fluxes
- fluxesError
- fluxesUnit
- nbCombinedCcd
- nbCombinedTransit
- solutionId
- sourceId
- status
- gmdbstrip
- transitId
- wavelengths
- wavelengthsError

[FILES: *meanspecwavelengthscale*]
- bpLambda
- rpLambda
- solutionId

[FILES: *sourcesource_CU8*]
- nbTransits
- solutionId
- sourceId
- sourceType

[FILES: *meanspec*]
- bpFlux
- bpFluxError
- numBpTransit
- numRpTransit
- rpFlux
- rpFluxError
- solutionId
- sourceId

[FILES: *sourcemeancharacteristics*]
- assumedPhysicalMultiple
- binarityProbability
- emissionLines
- epoch
- gRvs
  - gmdberror
  - solutionId
  - value
- nbComponents
- radVelConvectiveShift
- radVelKinBar
  - gmdberror
  - isValid
  - solutionId
  - value
- radVelSpeBar
- radVelSpeBarSys
  - gmdberror
  - isValid
  - solutionId
  - value
- solutionId
- sourceId
- vSinI
- variabilityProbability

[FILES: *paramsphot*]
- a0
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- ag
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- alphaFe1
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- feH1
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- logG1
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- multiEpochFlag
- r0
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- solutionId
- teff1
  - gmdberror
  - gof
  - info
  - gmdbname
  - val
- transitId
- sourceId

[FILES: *agissource*]
- astroParamCovariances
- conditionNo
- converged
- excessNoise
- excessNoiseSig
- meanWeightReduction
- nDegFree
- nIter
- nObs
- nOutlier
- nParamSolved
- primaryFlag
- rankDefect
- solutionId
- updateRMS
- alpha
- alphaError
- delta
- deltaError
- muAlphaStar
- muAlphaStarError
- muDelta
- muDeltaError
- radialVelocity
- radialVelocityError
- refEpoch
- varpi
- varpiError
- sourceId

[FILES: *photsource*]
- bpMean
  - constFlag
  - constLevel
  - fluxErr
  - fluxMean
  - fluxUwv
  - nObs
- gMean
  - constFlag
  - constLevel
  - fluxErr
  - fluxMean
  - fluxUwv
  - nObs
- noiseFlag
- rpMean
  - constFlag
  - constLevel
  - fluxErr
  - fluxMean
  - fluxUwv
  - nObs
- solutionId
- sourceId


All this is comes in the gbin format, which is some abomination based on
java serialized objects cooked up by the GAIA folks.

To deal with them, we use a custom grammar, res/jsogrammar, which takes
the actual mapping of input data to rawdict keys from its gbinmap
property.  These are sequences of key: source pairs are spit out
by bin/getschema.py.



Open Problems
=============

There are duplicate source ids in both sources and bp/rp spectra.  We
currently drop whatever comes later.  Presumably these are guys with
different solution ids, but we've not checked yet.

There are some other, erm, issues, which means  you'll currently have to run
gavo imp with the -c flag, and some sources will be ignored.

It's not 100% clear whether the rp/bp spectral points are really the
same for all instances.