opal AT lists.psi.ch
Subject: The OPAL Discussion Forum
List archive
- From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
- To: Ryan Roussel <rroussel AT anl.gov>
- Cc: opal AT lists.psi.ch
- Subject: Re: [Opal] Masking Feature Request
- Date: Sat, 21 Jul 2018 08:26:17 +0200
- Authentication-results: localhost; dmarc=pass header.from=gmail.com
Hi Ryan,
one would be to automatically convert these masks into sets of rectangles and then use FlexibleCollimator to describe them. The simplest implementation would use one rectangle for each black pixel. However this isn't ideal because the number of rectangles can be greatly reduced. But this optimization isn't trivial.
A much simpler way is to add a new collimator type, e. g. M COLLIMATOR and to use the raster of the image to find the pixel at the position of a particle.
We'll probably won't support the PNG file format because it demands the usage of yet another external library. Instead I suggest to use the file format Portable Bitmap (extension PBM) since it's quite easy to parse.
Christof
Ryan Roussel <rroussel AT anl.gov> schrieb am Do., 19. Juli 2018, 21:49:
Sorry for the confusion, this would be an extension of the COLLIMATOR element.RyanOn Wed, Jul 18, 2018 at 11:09 PM Christof Metzger-Kraus <christof.j.kraus AT gmail.com> wrote:Hi Ryan,sorry I don't quite understand how this feature should be implemented. Which command or element should be extended with this feature? DISTRIBUTION? COLLIMATOR? Or should this be a new command or element?ChristofRyan Roussel <rroussel AT anl.gov> schrieb am Mi., 18. Juli 2018, 23:08:Hello all,I was recently looking at the OPAL masking documentation and I was wondering if it would be possible to add in an option to mask the distribution by inputting a file containing matrix elements that describe a black and white image. This way one could use a physical mask image to create arbitrary masks. I have implemented this in python as part of a branch in pyOPALTools and included it in this email. While this works for generating initial distributions, a native implementation in OPAL would allow for arbitrary masking without having to split the beamline into separate OPAL simulations. Arguments would just be the matrix file, the size of the mask in physical units and a specifier to center the mask on the reference trajectory.Please let me know what you think,Ryan Roussel
- [Opal] Masking Feature Request, Ryan Roussel, 07/18/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/19/2018
- Re: [Opal] Masking Feature Request, Ryan Roussel, 07/19/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Adelmann Andreas (PSI), 07/21/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Adelmann Andreas (PSI), 07/21/2018
- Re: [Opal] Masking Feature Request, Adelmann Andreas (PSI), 07/21/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/21/2018
- Re: [Opal] Masking Feature Request, Ryan Roussel, 07/19/2018
- Re: [Opal] Masking Feature Request, Christof Metzger-Kraus, 07/19/2018
Archive powered by MHonArc 2.6.19.