EXtra-proposal¤
These are the development docs for extra-proposal. You probably want to check
out the official documentation in the EXtra
docs instead.
extra_proposal.Proposal ¤
Proposal(proposal: int | str, user_id: Optional[str] = None, user_secret: Optional[str] = None, user_email: Optional[str] = None, timeout=10)
Proposal object.
It can be instantiated as Proposal(2112) or Proposal("p002112")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
proposal
|
int | str
|
Proposal number. |
required |
user_id
|
Optional[str]
|
UID (can be generated at https://in.xfel.eu/metadata/oauth/applications). Defaults to None. |
None
|
user_secret
|
Optional[str]
|
Secret (can be generated at https://in.xfel.eu/metadata/oauth/applications). Defaults to None. |
None
|
user_email
|
Optional[str]
|
User's email. Defaults to None. |
None
|
Raises:
| Type | Description |
|---|---|
ProposalNotFoundError
|
The proposal does not exist. |
damnit ¤
Access DAMNIT results from this proposal.
Returns:
| Type | Description |
|---|---|
Damnit
|
A Damnit object for this proposal. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If no DAMNIT database exists for this proposal. |
run_techniques ¤
run_sample_name ¤
run_type ¤
samples_table ¤
search_source ¤
Search for data sources and aliases matching a glob pattern.
Performs a case-insensitive search across all data sources and aliases in the specified run(s).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pattern
|
str
|
A glob-style pattern (e.g. |
required |
run
|
int | list[int] | None
|
A run number, list of run numbers, or None to search all runs. |
None
|
Returns:
| Type | Description |
|---|---|
dict[int, list[str]]
|
A dictionary mapping run numbers to lists of matching source names and aliases. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If run is not an int, list of ints, or None. |
Example:
extra_proposal.proposal.RunReference ¤
A reference to a specific run within a proposal.
Provides access to run data, metadata, and DAMNIT results. Typically obtained by indexing a Proposal object.
Example:
prop = Proposal(1234)
run = prop[42] # Returns a RunReference
data = run.data() # Open DAQ data with extra_data
data ¤
Open the data of this run with extra_data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
Additional arguments passed to open_run(). |
{}
|
Returns:
| Type | Description |
|---|---|
DataCollection
|
A DataCollection for this run. |
damnit ¤
Access DAMNIT results from this run.
Returns:
| Type | Description |
|---|---|
RunVariables
|
A RunVariables object for this run. |
sample_name ¤
run_type ¤
Get the run type from myMdC for this run.
Returns:
| Type | Description |
|---|---|
str
|
The run type (e.g. "Sample", "Dark", "Calibration"). |
techniques ¤
plot_timeline ¤
Plot a timeline of when this run was taken, migrated, and calibrated.
Returns:
| Type | Description |
|---|---|
Axes
|
A matplotlib.axes.Axes object. |