mytardis instrumentΒΆ

usage: mytardis instrument [-h] {list,get,create,update} ...
Sub-commands:
list

Display a list of instrument records.

usage: mytardis instrument list
    [--facility FACILITY] [--limit LIMIT] [--offset OFFSET] [--order_by ORDER_BY] [--json]

  EXAMPLE

  $ mytardis instrument list --facility 1

  Model: Instrument
  Query: http://mytardisdemo.erc.monash.edu.au/api/v1/instrument/?format=json&facility__id=1
  Total Count: 3
  Limit: 20
  Offset: 0

  +----+-------------------------+---------------+
  | ID |          Name           |   Facility    |
  +====+=========================+===============+
  |  3 | Test Instrument         | Demo Facility |
  +----+-------------------------+---------------+
  |  4 | Beamline                | Demo Facility |
  +----+-------------------------+---------------+
  |  8 | James Test Instrument   | Demo Facility |
  +----+-------------------------+---------------+
Options:
--facility The facility ID.
--limit Maximum number of results to return.
--offset Skip this many records from the start of the result set.
--order_by Order by this field.
--json=False Display results in JSON format.
get

Display a single instrument record.

usage: mytardis instrument get [-h] [--json] instrument_id

  EXAMPLE

  $ mytardis instrument get 3

  +------------------+-----------------+
  | Instrument field |      Value      |
  +==================+=================+
  | ID               | 3               |
  +------------------+-----------------+
  | Name             | Test Instrument |
  +------------------+-----------------+
  | Facility         | Demo Facility   |
  +------------------+-----------------+
Positional arguments:
instrument_id The instrument ID.
Options:
--json=False Display results in JSON format.
create

Create an instrument record.

usage: mytardis instrument create [-h] facility_id name

  EXAMPLE

  $ mytardis instrument create 1 "New Instrument"
  +------------------+----------------+
  | Instrument field |     Value      |
  +==================+================+
  | ID               | 9              |
  +------------------+----------------+
  | Name             | New Instrument |
  +------------------+----------------+
  | Facility         | Demo Facility  |
  +------------------+----------------+

  Instrument created successfully.
Positional arguments:
facility_id The ID of the new instrument’s facility.
name The name of the instrument to create.
update

Update/rename an existing instrument record.

usage: mytardis instrument update [-h] [--name NAME] instrument_id

  EXAMPLE

  $ mytardis instrument update --name "Renamed New Instrument" 9

  +------------------+------------------------+
  | Instrument field |         Value          |
  +==================+========================+
  | ID               | 9                      |
  +------------------+------------------------+
  | Name             | Renamed New Instrument |
  +------------------+------------------------+
  | Facility         | Demo Facility          |
  +------------------+------------------------+

  Instrument updated successfully.
Positional arguments:
instrument_id The ID of the instrument to update.
Options:
--name The new name of the instrument.