Creating a job object #96
Replies: 3 comments 3 replies
-
|
Having a single primary object that the user interacts with is not only simpler, but also allows for cleaner user scripts. I fully support this idea, but I would propose a different name for this object, as |
Beta Was this translation helpful? Give feedback.
-
|
I would propose the simple Job class hierarchy to be actually present. The base Job class could be an abstract class, which would enforce the main components to be properly overwritten in derived classes. flowchart LR
A[JobBase] --> B[DiffractionJob]
A --> C[ReflectometryJob]
The main components, as discussed, would be
Should the base class contain anything else? |
Beta Was this translation helpful? Give feedback.
-
|
As for specialization of the flowchart LR
A[DiffractionJob] --> B[DiffractionJob_Powder]
A --> C[DiffractionJob_SC] --> I(etc)
B --> D[DiffractionJob_Powder_TOF]
B --> E[DiffractionJob_Powder_CW]
D --> F[DiffractionJob_Powder_TOF_1D] --> H(etc)
This would be quite unwieldy, if we wanted to specialize the Job classes properly. Maybe having object attributes on job.is_tof = isinstance(job.experiment, "DiffractionExperiment_TOF_1D_Powder") |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I propose to discuss here how the user creates the main EasyDiffraction object,
job, and what this object should be responsible for.A
jobis a wrapper for everything related to the physical model, experiment description, data store with experimentally measured and calculated data, binding to calculation engines, etc. Currently, the job type is defined by the class used to create the job object, e.g.Powder1DCW,Powder1DTOF, etc. The proposal is to instead have a generic job type, but support multiple types of experiments.Currently, a job needs a name because a
datastoreobject can store data from multiple jobs. The job name is then used as a prefix in the dataset label. It is proposed to makedatastorespecific to jobs so that a job name is not required.⚙ Current
💡 Suggested
Beta Was this translation helpful? Give feedback.
All reactions