-
Notifications
You must be signed in to change notification settings - Fork 1
[Draft] Adding Experiment setups
#89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…d some tweaking to allow no separate driver.
…ired for experiments).
…. will likely change it to add g and B as attributes, so I can set Experiment.spectrometer.g/B directly when running a simulation
… within what the function accepts
…ad-field-gradient like experiment.spectrometer.g after creating an instance of the experiment, since it contains an instsance of the spectrometer class as an attribute. Same goes for the dipole field B_dipole
…ccessed when doing the impactx simulation
… to main. Kept functionality which allows for no driver
…ts in plot_wake().
…tom title as input. This is for plot_spectrometer_x
…ield as an attribute to the spectrometer
abel/classes/beam.py
Outdated
| cb.ax.set_ylabel('Charge density (pC/um^2)') | ||
|
|
||
|
|
||
| def plot_spectrometer_x(self, range_x=None, range_y=None, vlim=None, title=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be moved to spectrometer.py.
abel/classes/beam.py
Outdated
| self.trackable_number = -1 # will increase to 0 after first tracking element | ||
| self.stage_number = 0 | ||
| self.location = 0 | ||
| self.location = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set these in the argument list as defaults instead.
… and other implementations.
| # ========== Rotate the coordinate system of the beams ========== | ||
| # Perform beam rotations before calling on upramp tracking. | ||
| if self.parent is None: # Ensures that this is the main stage and not a ramp. | ||
| if self.parent is None and self.driver_source is not None: # Ensures that this is the main stage and not a ramp. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in order for Experiment tracking to work, since the stages in Experiment does not have a driver source. I am wondering if this patch can be done more elegantly. In any case, if we use this solution, this needs to be done for the other stages too.
|
|
||
| # Will only rotate the beam coordinate system if the driver source of the stage has angular jitter or angular offset | ||
| drive_beam_rotated, beam_rotated = self.rotate_beam_coordinate_systems(driver_incoming, beam_incoming) | ||
| else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in order for Experiment tracking to work, since the stages in Experiment does not have a driver source. I am wondering if this patch can be done more elegantly. In any case, if we use this solution, this needs to be done for the other stages too.
…the FACET2 preset. More to come.
An important use of ABEL beyond the collider application is that of doing simulations for experiments. We specifically wish to implement PWFA experiments (FACET-II and FLASHForward for now) and APL experiments (CLEAR and CLARA for now).
To do:
Experimentworks properly