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

Simplify "Background correction" #46

Closed
weidemann opened this issue Oct 29, 2013 · 9 comments

Comments

@weidemann
Copy link
Collaborator

commented Oct 29, 2013

Amplitude correction for non-correlated background (BG) is covered by the tool “Background correction”. The procedure requires quite some clicks in different panels, therefore I want to suggest a simplification:

In contrast to fluorescence spectroscopy, where BG spectra have a shape, non-correlated BG in FCS is considered to be constant during the measurements. The correction is based on the mean value. Usually one measures several background (BG) curves (for example in several cells) and calculates the mean of their average signal. In these cases uploading a single file is dispensable. The progression of individual BG measurements can be reviewed in a regular way with “trace view”. Therefore, I don’t see the need for displaying the traces in a separate window. When the average and the standard deviation will be accessible in the “Statistics” panel (open issue #43 ), BG values can be easily obtained within PyCorrFit.

Therefore it might be easier to remove the tool entirely. An ergonomic way of treating this topic is to extend the frame “amplitude parameters” in the main fitting panel.
One could manually (preferentially not by pull down) add the BG values for 2 channels. As a cherry on the cake one may include the option to apply (maybe not dismiss) BG values to selected pages.

This makes 5 rows altogether for the frame “amplitude parameters” and I think this will not endanger the slim design of this panel. The main advantage is that the BG in relation to the average signal is always visible at once and that the channel assignment would be clearly defined.

  1. row: avg. signal channel 1, output window
  2. row: BG channel 1, input window, select pages, apply
  3. row: avg. signal channel 2, output window
  4. row: BG channel 2, input window, select pages, apply
  5. row: normalization, select pages, apply
@paulmueller

This comment has been minimized.

Copy link
Member

commented Nov 14, 2013

Hello,
I think one shouldn't remove a tool just because it is too complicated. In my opinion, importing the background from measurement data is an essential part - I used it quite frequently.

Displaying the average signal on the panel:
I edited your thread and created a new issue #53.

I would like to keep the panel simple - maybe one could let the user edit the countrate within the pull-down menu
You asked to let the user enter two values for two background channels. I believe you want to somehow calculate cpp for two different species in CC. However, the user then would need to connect the particle numbers from the fit to the different intensity channels. I think a new tool would be necessary.

Please elaborate.

@weidemann

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 15, 2013

Hi,

believe me, all my issues have only one purpose: simplify while keeping the functionality! The program is the better the easier the relevant information is accessible. E.g. count rate is a fundamental measurement parameter. Therefore it should be displayed in the main window.

I am not suggesting to remove the BG correction. I know it is important, therefore I would like to put it at the forefront. BG correction burns down to two numbers: non-correlated signal (kHz) in Channel 1 and in Channel 2. You don't need any other information, no trace, nothing. Is there anything that the BG tool provides besides assigning these two numbers to each page?

Non-correlated BG should be displayed in the main window below or aside the the average signals. That's where it belongs. Without BG information amplitude parameters like n are not fully defined.

Check the little list (1.-5.) in the issue. I think these commands contain all we need.

@weidemann weidemann closed this Nov 15, 2013

@weidemann weidemann reopened this Nov 15, 2013

@weidemann

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 15, 2013

Sorry pushed the wrong button. I didn't want to close the issue. Therefore another comment.

In general pull-down menus are not so convenient for working with large data sets, because the mousing is tedious. It is better to type a number and to apply to other pages. We could even spare the "Select pages" and "Apply" buttons in the list (points 2. and 4.) because this could be done with batch control.

I do not understand your comment about CPP. I had nothing in mind, besides BG correction itself. Once the two BG numbers are there, CPP is defined. I currently see no additional features.

@paulmueller

This comment has been minimized.

Copy link
Member

commented Nov 15, 2013

The problem is that PyCorrFit does not know which signal belongs to which component.
Let's say you have a two-component cross-correlation with particle numbers n1 and n2 from the fit. How should PyCorrFit deal with the countrates and map them to cpp1 and cpp2?
Right now the cpp is not calculated for CC experiments, because I could not think of a proper way to calculate it. Do you only want the cpp for n1+n2?

I was suggesting a tool to perform more elaborate tasks like cross-talk correction. Here the user would have to map the components from the fit to a channel. A little more user input would be required, though.

@weidemann

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 15, 2013

I agree, the CPP cannot be calculated for individual diffusion species without additional information. For the time being one should calculate CPP only for n (= n1+n2), as you say. However, this is not the CPP-issue but the BG issue ;-).

I guess PyCorrfit "knows" which signal belongs to which channel (AC1, AC2)? Then, everything is fine.

In my opinion BG correction is no optional tool in the true sense of the word, rather an integral part of the data set. BG correction it is a must.

BG correction is only two numbers (BG1, BG2). Cross-talk correction as well is only two numbers (bleed through BT12 and BT21). All the rest is just formulas. I believe all these amplitude relevant corrections could be part of the Amplitude correction box without making the main window complicated.

@paulmueller

This comment has been minimized.

Copy link
Member

commented Nov 15, 2013

Ok,
so the cpp that will be calculated for CC experiments will be an average cpp. That's settled.

However, for a cross-talk correction, or calculation of cpp1 and cpp2 we need user input.

  1. PyCorrFit "knows" which signal belongs to which channel (AC1, AC2).
  2. PyCorrFit does not know which channel belongs to which fit parameter (n1 or n2?), because these are completely free parameters and could even be swapped during fitting.

If you want to find cpp1 and cpp2 by comparing the diffusion time of the two components in CC with the times in AC1 and AC2, then a lot of stuff could go wrong.

  1. The user may not have loaded all data from AC1 and AC2
  2. The user could have accidentally deleted a page with AC1. Now I need to pop-up an error message which will confuse the user because he might have just wanted to do something entirely different.
  3. If the diffusion times are very close, then they could be swapped.
    I would not want to do this in the background, but have a special tool for that - with a user who knows what goes where.
@weidemann

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 15, 2013

no panic, we can sort it out.

Of, course intensity and fit parameters are not linked. I agree with all you points. Therefore a simple conclusion: do not calculate CPP for individual components, neither in CC nor AC. Just the average CPP. Leave disentanglement of individual contributions to the user for post-processing (some Excel sheet), where he/she can carefully keep track of diffusion times, channels and signals.

@paulmueller

This comment has been minimized.

Copy link
Member

commented Dec 9, 2013

summary:

  • no cpp for cross-correlation
  • perform BG correction for CC according to methods of enzymology (S1/(S1-B1) * S2/(S2-B2))
  • display BG input (CC/AC) on each page
@paulmueller

This comment has been minimized.

Copy link
Member

commented Jan 4, 2014

done in 0.8.1

@paulmueller paulmueller closed this Jan 4, 2014

paulmueller pushed a commit that referenced this issue Sep 30, 2015

paulmueller
Issue #46: 1. data points are now visible
Former-commit-id: b04e88bfd09ef9f78610fabd8f46ed411645d55f [formerly 5fa77a7cb251fb6a8082b5c746c67fa7b561d66d] [formerly 0f3bc85a4dfb3e08f273528aabfc831eca00cbed] [formerly c2a74a6489585e79040423ff419a2c367002fafc [formerly a19e885352721346be82b724f19aa6e9fb8e3669] [formerly 0f3bc85a4dfb3e08f273528aabfc831eca00cbed [formerly 1b856af]]]
Former-commit-id: 76523f9256bc3863a1b4f1ae3b0fc81b87c5c6c2 [formerly a36c99bb831ae102bfa7abc13464ac811dc81f1d] [formerly d1f74b27ae8220eb15eddad3dcdf1a9ed76d53e9 [formerly 405d5804d15389d67a3d9a9e47a343f6dcb2581a]]
Former-commit-id: d1f74b27ae8220eb15eddad3dcdf1a9ed76d53e9
Former-commit-id: e31a53aac27c842e88bdbcc13da11438f536a771
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.