Skip to content

Add option for auto-yes, list/describe exp version in CLI and fast entry point

Tuan Pham requested to merge issue/cli-fast-y into master
  • Fixes #102 (closed) : Add -y/--yes option when converting for auto-yes

  • Fixes #88 (closed) : Move the import inside for faster CLI entry point, especially for helper commands

  • Fixes #137 (closed) : Pandas warning

  • Adds -l option for listing experiment versions

  • Adds -E option for describing a given experiment version (as toml output)

    Click to expand on help tag
    $ time calimag --help
    Usage: calimag [OPTIONS] [CONFIGFILE]
    
    Options:
      -y, --yes                       Accept all actions to follow as "y"
      -l, --list-versions             List acceptable "EXPERIMENT_VERSION" in the
                                      config file
      -E, --describe-version [v2021.05:2p_imaging_head_fixed+Simon|v2019.07:2p_imaging_head_fixed+Max|v2021.04:2p_imaging_head_fixed+Max:spontaneous-activity|v2022.05:2p_imaging_head_fixed+Max|v2020.06:2p_imaging_head_fixed+Simon]
                                      Describe a given "EXPERIMENT_VERSION"
      --help                          Show this message and exit.
    real    0m0.109s
    user    0m0.092s
    sys     0m0.018s
    Click to expand on list/describe options
    $ time calimag -l
    Currently these are the acceptable experiment versions:
            v2021.05:2p_imaging_head_fixed+Simon
            v2019.07:2p_imaging_head_fixed+Max
            v2021.04:2p_imaging_head_fixed+Max:spontaneous-activity
            v2022.05:2p_imaging_head_fixed+Max
            v2020.06:2p_imaging_head_fixed+Simon
    
    For specific experiment version, use `-E`. For example:
    
            calimag -E v2021.05:2p_imaging_head_fixed+Simon
            calimag -E v2019.07:2p_imaging_head_fixed+Max
    
    
    real    0m0.140s
    user    0m0.105s
    sys     0m0.035s
    
    
    $ time calimag -E v2019.07:2p_imaging_head_fixed+Max
    
    Calimag version 1.5.1.dev54+g1095c4e.d20240130
    
    The teensy config for v2019.07:2p_imaging_head_fixed+Max is
    
    [time]
    unit = "ms"
    SI_unit = "sec"
    conversion_factor = 1
    
    [odor]
    unit = "-"
    SI_unit = "-"
    conversion_factor = 1
    description = "Odor stimulus ID (raw)."
    comments = "This may not indicate when the stimulus is ON for each trial. This may not indicate the actual chemical names of the stimulus. Additional information may be needed to infer either."
    
    [flow]
    unit = "cm3/min"
    SI_unit = "m3/sec"
    conversion_factor = 5.9999999999999995e-5
    description = "Air flow signal from sensor to measure respiration."
    
    [wheel]
    unit = "-"
    SI_unit = "-"
    conversion_factor = 1
    description = "Raw wheel position from micro-controller."
    comments = "Any value greater than `WHEEL_MAX_ENCODING=4096` was turned into NaN values. Because this is from Teensy, there is no unit. To get wheel position in `radian` or speed in `meter/second`, additional information may be needed. However, for the former, for simplicity, one may cautiously consider `WHEEL_MAX_ENCODING` as `2 * pi`"
    
    [trial]
    unit = "-"
    SI_unit = "-"
    conversion_factor = 1
    
    
    real    0m0.146s                                                                                                                                      
    user    0m0.106s                                                                                                                                      
    sys     0m0.054s 
    
Edited by Tuan Pham

Merge request reports