Skip to content
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

Contributed component Source_custom #1911

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

pablogila
Copy link

@pablogila pablogila commented Mar 28, 2025

Hi there!

I noticed that the contributed component Source_pulsed, while very customisable, only simulates the very first pulse of the beam. This may be the desired behaviour for some use cases, but others may need to simulate more pulses.

I have created a new contributed component, Source_pulsed_multi Source_custom, which simulates all expected pulses in the specified time interval. It is a modification of the previously mentioned Source_pulsed. All component parameters remain the same and the component documentation is up to date.

Attached is a simple test instrument to demonstrate the proper behavior of the proposed component:
Source_pulsed_multi.zip

The output signal from the test instrument with the previous Source_pulsed component:
Source_pulsed

And the output signal with the new Source_pulsed_multi component:
Source_pulsed_multi

@willend
Copy link
Contributor

willend commented Mar 29, 2025

@pablogila thanks, will have a look soonish. :-) Two things consider in the meantime:

  • (By tradition) McStas is systematic about using "source units of n/s" irrespective of time structure... (See e.g. ESS_butterfly that produces "one second of intensity" no matter if 1 or 14 pulses is simulated)
  • The example instrument can / should be put under examples/some_category. If the instrument has no relation to a physical facility you can use e.g. Tests_sources :-)

@pablogila
Copy link
Author

Thanks for the feedback Peter! I will check and add some things, will let you know then :D

…ucture; using tmax_multiplier and n_pulses parameters.
@pablogila pablogila reopened this Mar 31, 2025
@pablogila pablogila changed the title Contributed component Source_pulsed_multi Contributed component Source_custom Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants