Skip to Content.
Sympa Menu

opal - Re: [Opal] Masking Feature Request

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] Masking Feature Request


Chronological Thread 
  • From: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
  • To: Andreas Adelmann <andreas.adelmann AT psi.ch>
  • Cc: Ryan Roussel <rroussel AT anl.gov>, opal AT lists.psi.ch
  • Subject: Re: [Opal] Masking Feature Request
  • Date: Sat, 21 Jul 2018 13:20:45 +0200
  • Authentication-results: localhost; dmarc=pass header.from=gmail.com

The laser profile still works (although it's a while since I've tested it). Other formats than h5 should be easy to implement. 

Adelmann Andreas (PSI) <andreas.adelmann AT psi.ch> schrieb am Sa., 21. Juli 2018, 12:07:
I think having the ability to read in a PBM from a virtual cathode you be a very 
handy feature. We had this in the past, reading from an h5 file.
Cheers Andreas 

On 21 Jul 2018, at 10:29, Christof Metzger-Kraus <christof.j.kraus AT gmail.com> wrote:

Hi Ryan, 

would it help if we extended the language that is used to describe the holes in a collimator? Possible extensions include arbitrary polygons and operators such as intersection and difference.

Christof 

Christof Metzger-Kraus <christof.j.kraus AT gmail.com> schrieb am Sa., 21. Juli 2018, 08:26:
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.
Ryan 

On 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? 

Christof 




Ryan 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 




Archive powered by MHonArc 2.6.19.

Top of Page