# Data access — get_ms, remove, make_ms_list ## get_ms — print MS paths Prints a space-separated list of MS paths for the given obs_ids, data level, and spectral windows. The output is designed for shell command substitution. ### Examples ```bash # Get all L2 MSs for a set of nights, SW03 mss=$(nenudata get_ms L2 "202312*_NT04" --sws SW03) calpipe cal/ddecal.toml $mss ``` ```bash # Narrow to two specific spectral windows mss=$(nenudata get_ms L2 "20231208_NT04" --sws SW03,SW04) ``` ```bash # Append a sub-path inside each MS (e.g. to point at a diagnostic sub-dir) nenudata get_ms L2 "20231208_NT04" --post_path logs ``` With `--post_path logs`, each path becomes `/net/node/obs/L2/SW03.MS/logs`. ### Options | Option | Default | Description | |---|---|---| | `--sws` / `-s` | `all` | Comma-separated spectral windows, or `all` | | `--post_path` / `-p` | `` | Appended to each MS path as a sub-directory | | `--config` / `-c` | `data_handler.toml` | Data-handler config file | ## remove — delete MS files ``` nenudata remove L2 "202312*_NT04" ``` Prompts for confirmation before deleting all MSs matching the given obs_ids and spectral windows at the specified data level. Use `--sws` to restrict to specific spectral windows. ``` nenudata remove L2 "20231208_NT04" --sws SW03 ``` ## make_ms_list — write MS path files for calpipe/DP3 Creates plain text files containing MS paths, one file per `(obs_id, sw)` combination. These files can be passed to calpipe or DP3 via `@filename` syntax. ### One list file per (obs_id, sw) ``` nenudata make_ms_list L2 "202312*_NT04" --target ms_lists/ ``` Creates files like `ms_lists/20231208_NT04_L2_SW03` containing all MS paths on one line (space-separated by default). ### One MS per line (column format) ``` nenudata make_ms_list L2 "202312*_NT04" --column ``` Each MS path is written on its own line. Useful for tools that read line-delimited input. ### One file per individual MS ``` nenudata make_ms_list L2 "202312*_NT04" --per_ms --target ms_lists/ ``` Creates a sub-directory `ms_lists/20231208_NT04_L2_SW03.d/` containing one file per MS file. ### Filter by elevation ``` nenudata make_ms_list L2 "202312*_NT04" --min_alt 25 ``` Only includes MSs where the mean elevation of the target field is at least 25 degrees. ## Reference ```{eval-rst} .. click:: nenucal.tools.nenudata:get_ms :prog: nenudata get_ms :nested: full ``` ```{eval-rst} .. click:: nenucal.tools.nenudata:remove :prog: nenudata remove :nested: full ``` ```{eval-rst} .. click:: nenucal.tools.nenudata:make_ms_list :prog: nenudata make_ms_list :nested: full ``` ## See also - [pipeline](pipeline.md) — create L2/L3 data from existing levels - [transfer](transfer.md) — move data between sites