Skip to content

Add validator

payno requested to merge add_validator into master

scope

Lately tomwer included a widget with some 'entry validation'. This could be extended to nabu for an application to check data prior to reconstruct them.

This could also be integrated in nxtomomill once the Nexus file is write down.

Tomwer would probably require those at the Entry level (so extra information could be provided in tooltip) Nabu would probably need an interface like:

nabu validator [file.h5/folder] [[entries]] [--no-phase-retrieval] [[--check-datasets]] [[--all-entries]]

TODO

validators requested:

  • energy
  • distance
  • pixel size
  • darks (urls exists, check broken vds and nan)
  • flats (urls exists, check broken vds and nan)
  • projections (urls exists, check broken vds and nan)
  • High level validator for reconstruction (with or without phase retrieval)
  • improve readability
    • at least adjust text on the left
    • maybe we could add some icons on the terminal like 'black' for example for readability and fanciness ;)
  • improve vds check: look on virtual source to only check the dataset we are interested on.

extra info

I expect the high level validator (for a reconstruction for example) to provide two 'analysis':

  • summary:
- entryXXX@master_file.nx
   - energy: valid
   - darks: invalid: expected data in XXX
   - projections: invalid: has broken virtualdataset link
   - flats: invalid: contains nan...
   - distance: valid
  • resume:
- 3 issues:
   - darks: invalid: expected data in XXX
   - projections: invalid: has broken virtualdataset link
   - flats: invalid: contains nan...

API

a single entry validator or a Reconstruction validator should have the same API:

class ValidatorBase:
   def is_valid(self):
      ...

   def run(self):
      ...

   def clear(self):
      ...

extra info

close #35 (closed)

should trigger nabu!141 (merged)

An example of result from nabu with source scan removed for dark and flat

image

Edited by payno

Merge request reports