Skip to content

Defining derivatives in a chain #8

@sappelhoff

Description

@sappelhoff

NOTE This stems from the bids derivatives workshop Copenhagen 2023


How to define derivatives in a "chain"?

Usually this is done via the Sources metadata. However, it might be nice to document the processing chain more explicitly, for example in the entities:

  1. <source_entities>_desc-downsampled_<suffix>.<ext>
  2. <source_entities>_desc-downsampled+filtered_<suffix>.<ext>

--> problem: this would result in very long filenames fairly quickly.

Alternatively, one could have much shorter labels for the preprocessing steps:

  1. <source_entities>_desc-ds+filt_<suffix>.<ext>

--> problem: short labels like "ds" may be too general (i.e., take up a lot of "namespace")

Another alternative would be to have "generic" desc labels with an "inbuilt" index (label1, label2, etc.):

  1. <source_entities>_desc-preproc1_<suffix>.<ext>
  2. <source_entities>_desc-preproc2_<suffix>.<ext>
  3. <source_entities>_desc-preproc3_<suffix>.<ext>

paired with a: <source_entities>_<suffix>.json

that is organized as:

{
    "PreprocessingChain": {
        "preproc1": "downsampling",
        "preproc2": "filtering",
        "preproc3": "..."
    }
}

--> Important note: order in a JSON object should have a meaning ... if it doesn't (to be clarified), we might need to use a JSON array.

More complete example:

{
    "PreprocessingChain": {
        "preproc1": "downsampling",
        "preproc2": "filtering",
        "preproc3": "..."
    },
    "downsampling": {
        "description": "lorem ipsum",
        "Sources": "bids::<source_entities>_<suffix>.<ext>",
        "Anti-aliasing-filter": "<link to key-value pair in SoftwareFilters>",
        "Method": "downsampling method (e.g., decimation --> taking every nth sample; or something else)",
    	"SamplingRate": 300
    },
    "filtering": {
        ... 
    }   
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions