Skip to content

Revised CalCat API

Thomas Kluyver requested to merge calcat-api-2 into master

This is based on our discussion last week, but it's still a WIP. In particular, I haven't implemented actually loading the constants yet.

I've tweaked the design slightly: rather than having CalibrationData subclasses for each detector type, you use CalibrationData.from_conditions() with a detector specific object like AGIPDConditions. Jump to the tests to see what this looks like.

Questions:

  • How to deal with missing modules?
    • A module may be missing for one type of constant but not for another
    • How do we even tell if modules are missing - should we query the PDUs so we know how many modules to expect?
  • How to deal with missing calibration types (e.g. SlopesPC)
    • Especially if one group (e.g. illuminated) not found - this currently raises an error, even if we have other constants we could return
  • Naming:
    • 'Calibrations' vs 'calibration' types vs 'constant types' (e.g. Offset, SlopesPC
    • 'Modules' vs 'aggregators'
  • How many of SingleConstantVersion fields do we actually want?
  • Should .select_modules() and .select_calibrations() take *args or a list?

cc @schmidtp @ahmedk @hammerd

Edited by Thomas Kluyver

Merge request reports