Dear Michael ,
I have a slit followed by a screen downstream. Let us say the slits are along y-axis. So, the beam image has vertical slices whose projection in x yields a series of Gaussian profile separated by some distance .
"Goal": I want the rms of each of these Gaussians and the distance between the peaks written to a file using sddsgfit (or) other sdds fitting tools and plot it [for different beam settings upstream]. (Basically, for a resolution check with the instrumentation).
Right now, all i can think of is using an ascii file output and then use a fitting tool.
Is there a way to extract this just from the sddsfile using sddsgfit?
Thanks....your help is much appreciated.
regards,
Charles
Slits and GaussianFit
Moderators: cyao, michael_borland
-
- Posts: 2008
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Slits and GaussianFit
Charles,
Is there a single slit that is varied in position or size, or a multiple-aperture slit?
--Michael
Is there a single slit that is varied in position or size, or a multiple-aperture slit?
--Michael
Re: Slits and GaussianFit
Dear Michael,
It is a multi-slit.
regards,
Charles
It is a multi-slit.
regards,
Charles
-
- Posts: 2008
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Slits and GaussianFit
Charles,
Assuming your spots are separated by gaps of 1e-3 (1mm), I'd try something like this:
sddssort output.sdds -pipe=out -column=x,incr \
| sddsbreak -pipe -gap=x,amount=1e-3 \
| sddshist -pipe -bins=100 -data=x \
| sddsgfit -pipe -column=x,frequency -tolerance=1e-14 \
| sddscollapse -pipe=in fitResults.sdds
sddsprintout -col fitResults.sdds
If you need more help, please post a sample output file.
--Michael
Assuming your spots are separated by gaps of 1e-3 (1mm), I'd try something like this:
sddssort output.sdds -pipe=out -column=x,incr \
| sddsbreak -pipe -gap=x,amount=1e-3 \
| sddshist -pipe -bins=100 -data=x \
| sddsgfit -pipe -column=x,frequency -tolerance=1e-14 \
| sddscollapse -pipe=in fitResults.sdds
sddsprintout -col fitResults.sdds
If you need more help, please post a sample output file.
--Michael
Re: Slits and GaussianFit
Dear Michael,
First of all, many thanks for the script.
I have been testing the script and i believe it is working. But to convince myself, I would like to plot the series of Gaussian with the calculated sigmas (from fitResults.sdds) on top of the actual projections. How can i do that?
For sample: I am attaching my ele and lte files. The output is in A0_Xchngr1.x4. I would like to see a plot of the calculated Gaussians on top of the actual projections. For convenience, I am attaching my plotting script rmsplot.s { Usage: rmsplot.s X4). It plots the beam transverse profile and its projections on x and y at location X4 and also prints out the gFitsigmas from your script for each of the beamlets.
Thanks again!
regards,
Charles
First of all, many thanks for the script.
I have been testing the script and i believe it is working. But to convince myself, I would like to plot the series of Gaussian with the calculated sigmas (from fitResults.sdds) on top of the actual projections. How can i do that?
For sample: I am attaching my ele and lte files. The output is in A0_Xchngr1.x4. I would like to see a plot of the calculated Gaussians on top of the actual projections. For convenience, I am attaching my plotting script rmsplot.s { Usage: rmsplot.s X4). It plots the beam transverse profile and its projections on x and y at location X4 and also prints out the gFitsigmas from your script for each of the beamlets.
Thanks again!
regards,
Charles
- Attachments
-
- slits.tar.gz
- (3 KiB) Downloaded 849 times
-
- Posts: 2008
- Joined: 19 May 2008, 09:33
- Location: Argonne National Laboratory
- Contact:
Re: Slits and GaussianFit
Charles,
I cleaned up your multi-slit script so it is more compact and easier to follow. I also added commands to your rmsplot script to overlay the fits on the beamlet histograms.
Please see attached.
--Michael
I cleaned up your multi-slit script so it is more compact and easier to follow. I also added commands to your rmsplot script to overlay the fits on the beamlet histograms.
Please see attached.
--Michael
- Attachments
-
- slits.tar.gz
- (2.82 KiB) Downloaded 876 times
Re: Slits and GaussianFit
Bingo..you are terrific...thanks!
regards,
Charles
regards,
Charles