htesp.ifermi_plot¶
Module to generate command for ifermi.
FIX(23): ifermi itself is an optional extra and is NOT imported here –
this module only assembles the ifermi ... command line from
ifermi.json. check_ifermi() looks the executable up at the point of
use and says how to install it when it is missing, so importing this module
never requires the package.
Functions
Raise a clear message when the optional |
|
|
Construct a command string for the ifermi command based on the provided command and parameters from a JSON file. |
|
Print the assembled ifermi command line. |
- htesp.ifermi_plot.ifermi(command, input_file='ifermi.json')[source]¶
Construct a command string for the ifermi command based on the provided command and parameters from a JSON file.
Parameters: - command (str): The command to execute (either ‘info’ or ‘plot’).
Returns: - str: The constructed command string.
If the ‘ifermi.json’ file exists, it reads the parameters from the file corresponding to the given command. If the parameter is a boolean value (True or False), it treats it as a boolean flag without a value in the command string. If the ‘ifermi.json’ file does not exist, it prints a message indicating the absence of the file.