Skip to content

Sample metadata

Closes #1930 (closed) #2194 (closed)

Expand ICAT support:

  • SCAN_SAVING API:

    • rename: newsample -> newcollection
    • rename: sample -> collection
    • rename: sample_name -> collection_name (change in db=0 but no need to flush)
    • deprecation warning: sample (use collection instead)
    • deprecation warning: sample_name (use dataset.sample_name instead)
    • newsample: same as newcollection but sample name is set to the collection name (which is the directory name)
  • The sample name: dataset specific

    • newdataset(..., sample_name="samplename")
    • scan_saving.dataset.sample_name=...
  • The sample name: fallback for all datasets in the collection

    • newsample("samplename")
    • newcollection(..., sample_name="samplename")
    • scan_saving.collection.sample_name=...
  • The sample description: dataset specific

    • newdataset(..., sample_description="sample descr")
    • scan_saving.dataset.sample_description="sample descr"
  • The sample description: fallback for all datasets in the collection

    • newsample(..., description="sample descr")
    • newcollection(..., sample_description="sample descr")
    • scan_saving.collection.sample_description=...
  • The dataset description

    • newdataset(..., description="dataset descr")
    • scan_saving.dataset.description="dataset descr"

Redis structure: ...:proposal:collection:dataset (change in db=1)

You can set any metadata field on each of these three levels. The lower level overwrites the higher levels. This is used for example for the sample name. newsample sets the Sample_name field on the collection so it will be used by all its dataset, except for the datasets that have the Sample_name field defined explicitly.

Current workaround for missing dataset description in ICAT

As there is currently no Dataset_description field in ICAT, for each dataset the ICAT field Sample_description will be equal to

f"{sample_description} ({dataset_description})"

or

f"{dataset_description}"

or

f"{sample_description}"

in case one of them is not defined.

Edited by Wout De Nolf

Merge request reports