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: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
  • To: Christof Metzger-Kraus <christof.j.kraus AT gmail.com>
  • Cc: Ryan Roussel <rroussel AT anl.gov>, "opal AT lists.psi.ch" <opal AT lists.psi.ch>
  • Subject: Re: [Opal] Masking Feature Request
  • Date: Sat, 21 Jul 2018 10:05:26 +0000
  • Accept-language: en-US, de-CH
  • Authentication-results: localhost; dmarc=skipped



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

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.

What is the reasoning for adding an other element? The FlexibleCollimator could simply accept an PBM file.



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.


I agree 

A


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