background subtraction? using XRDBS?

34 views
Skip to first unread message

Sarah....@gmail.com

unread,
Feb 22, 2008, 6:14:10 PM2/22/08
to Area Diffraction Machine
I guess that the background (dark current) subtraction is still in the
works. In the meantime, is it possible to use Sam's XRDBS to do a
background subtraction? It reads .chi files like the output from Fit
2D. I think that they were space delimited and the ADM files are tab
delimited.

thoughts on how close the background subtraction feature in ADM is to
being available?

joshu...@gmail.com

unread,
Feb 23, 2008, 2:17:10 AM2/23/08
to Area Diffraction Machine
To be quite honest, I don't know very clearly what a background
subtraction is. I think that the intention of the "Dark Current" input
on the Calibration page which is grayed out is some sort of correction
that has to do with how much of a signal the detector would pick up
when the x-ray source was turned off. And I think this correction is
applied to the 2D diffraction data. But nobody could actually give me
any information on what the dark current file format is so I was not
able to actually implement the feature. If anybody could actually
explain to me how a Dark Current subtraction worked, I would be happy
to add it in.

I have never used or even opened up XRD-BS, But from my very hazy
understanding of what XRD-BS does, I think that it applies some sort
of correction to the 2D integrated data. I have no objection to
migrating XRD-BS into my code, but I am very ignorant at this point
about how to do it and we should probably discuss with Sam and Apurva
whether they would really like to see this done.

About using XRD-BS to do the analysis, I assume that this should work
fine. I really don't want to write into my code a compatibility
feature which makes my output look like Fit2Ds because it would
clutter up my program and only be needed temporarily.

If you want, I will be happy to write you a short python script that
can convert intensity integrated data that my code spits out into code
that XRD-BS can read in. Better yet would be to just make Sam update
his code to read in intensity integrated data the way I output it. He
seems to be pretty busy lately, though, so I am not sure how much he
would want to do this.

Josh

Sarah....@gmail.com

unread,
Feb 25, 2008, 12:48:18 PM2/25/08
to Area Diffraction Machine
You are right that dark current actually has to do with what the
detector outputs when no signal is coming in. From talking with
David, I got the impression that you guys were also going to use this
feature for background subtraction. Background subtraction is
essential to a lot of the work that goes on at 11-3 (Not mine, so
much, but a lot of it) and we really need a way to do background
subtraction either as a part of the ADM or as a separate program.

In terms of 11-3, background subtraction is removing the signal of
whatever (besides the sample) that the beam is interacting with. For
instance, the measurements that we took last summer were taken with
the sample in scotch tape. So, we would want to remove the
contribution of the scotch tape so we are left with only the
contribution from the sample. In that case, the scotch tape
contributes very little to the overall spectra, so it isn't a big
deal. However, there are many instances where the contribution of the
background is significant relative to the contribution to the sample,
sometimes even obscuring the contribution from the sample. Thus, it
is essential to have a way to subtract the background signal from the
sample signal in order to look at the data.

Typically, at the beginning of your run, you record your background
spectra. However, during the course of the day, the intensity of the
incoming flux changes. This means that the intensity of the
background spectra you collected at the beginning of the day won't
exactly correspond to the amount of background contribution in a
spectra collected 5 hours later. Thus, it is necessary to be able to
adjust the intensity of the background spectra by multiplying the
spectra by a scalar.

In my mind, the key features needed in a background subtraction
feature are as follow:
- a way to select one or more background signals to remove (XRDBS
allows 3)
- a way to see the sample spectra and the background spectra on the
same plot in either 2 theta or Q versus intensity
- a way to adjust the amount of background to be removed (multiply the
background spectra by 1.1 or 1.25 or 0.8 to adjust for variations in
the incident beam flux)
- a way to see the subtracted pattern
- a way to save the subtracted pattern

I'm sure Apurva and Sam could come up with more things that should be
involved, but these are my thoughts. I believe that much of Sam's
data would need this type of feature. Maybe he has some other way of
doing it that would be better. I'll see him at some point this week
and ask him how he envisions this working. Maybe I'll even try to
bribe him into changing the XRDBS code.
Reply all
Reply to author
Forward
0 new messages