apsbss: Command line application#

Retrieve specific records from the APS Proposal and ESAF databases.

This code provides the command-line application: apsbss

Note

BSS: APS Beamline Scheduling System

EXAMPLES:

apsbss now 19-ID-D
apsbss esaf 276575
apsbss proposal 1010753 2024-3 12-ID-B

Application

cmd_esaf(args)

Subcommand esaf: print list of beamlines.

cmd_list(args)

Subcommand list: print proposals and ESAFs for beamline and run

cmd_now(args)

Subcommand now: print information of proposals & ESAFs running now.

cmd_proposal(args)

Subcommand proposal: print specific proposal for beamline and run.

cmd_runs(args)

Subcommand runs: print APS run names.

cmd_search(args)

Subcommand search: Print proposals and ESAFs for beamline and run matching the query.

get_options()

Handle command line arguments.

main()

Command-line interface for apsbss program.

EPICS Support

connect_epics(prefix[, n])

Connect with the EPICS database instance.

epicsClear(prefix)

Clear the EPICS database.

epicsReport(args)

Subcommand report: EPICS PVs: report the PV values.

epicsSetup(prefix, beamline[, run])

Define the beamline name and APS run in the EPICS database.

epicsUpdate(prefix)

Update EPICS database instance with current ESAF & proposal info.

exception apsbss.apsbss.EpicsNotConnected[source]#

No connection to EPICS PV.

apsbss.apsbss.cmd_esaf(args)[source]#

Subcommand esaf: print list of beamlines.

PARAMETERS

args

obj : Object returned by argparse

apsbss.apsbss.cmd_list(args)[source]#

Subcommand list: print proposals and ESAFs for beamline and run

PARAMETERS

args

obj : Object returned by argparse

New in release 1.3.9

apsbss.apsbss.cmd_now(args)[source]#

Subcommand now: print information of proposals & ESAFs running now.

PARAMETERS

args

obj : Object returned by argparse

New in release 2.0.0

apsbss.apsbss.cmd_proposal(args)[source]#

Subcommand proposal: print specific proposal for beamline and run.

PARAMETERS

args

obj : Object returned by argparse

apsbss.apsbss.cmd_runs(args)[source]#

Subcommand runs: print APS run names.

PARAMETERS

args

obj : Object returned by argparse

Subcommand search: Print proposals and ESAFs for beamline and run matching the query.

PARAMETERS

args

obj : Object returned by argparse

apsbss.apsbss.connect_epics(prefix, n=5)[source]#

Connect with the EPICS database instance.

PARAMETERS

prefixstr

EPICS PV prefix

nint

Number of connection events to attempt before raising EpicsNotConnected.

apsbss.apsbss.epicsClear(prefix)[source]#

Clear the EPICS database. Connect with the EPICS database instance.

PARAMETERS

prefix

str : EPICS PV prefix

apsbss.apsbss.epicsReport(args)[source]#

Subcommand report: EPICS PVs: report the PV values.

PARAMETERS

args

obj : Object returned by argparse

apsbss.apsbss.epicsSetup(prefix, beamline, run=None)[source]#

Define the beamline name and APS run in the EPICS database. Connect with the EPICS database instance.

PARAMETERS

prefix

str : EPICS PV prefix

beamline

str : Name of beam line (as defined by the BSS)

run

str : Name of APS run (as defined by the BSS). optional: default is current APS run name.

apsbss.apsbss.epicsUpdate(prefix)[source]#

Update EPICS database instance with current ESAF & proposal info. Connect with the EPICS database instance.

PARAMETERS

prefix

str : EPICS PV prefix

apsbss.apsbss.get_options()[source]#

Handle command line arguments.

apsbss.apsbss.main()[source]#

Command-line interface for apsbss program.