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

Reporting the I(0) when fitting data. #3139

Closed
marocco53 opened this issue Oct 27, 2024 · 10 comments
Closed

Reporting the I(0) when fitting data. #3139

marocco53 opened this issue Oct 27, 2024 · 10 comments
Labels
Enhancement Feature requests and/or general improvements Fitting Perspective Concerns the fitting perspective

Comments

@marocco53
Copy link

This is not related to a problem.
We generate SAXS data in absolute units of intensity, that is, in g/mol

When reporting all parameters in fitting data using models (e.g., a flexible cylinder), it would be nice if also the I(0) could be reported, as this will directly give the molecular weight. Otherwise, one is forced to implement in a spreadsheet the equation used, use all the fit-derived parameters, and calculate it separately. Which can become cumbersome if polydispersity is used in the fitting.

Thanks for considering this! :-)

Mattia

@marocco53 marocco53 added the Enhancement Feature requests and/or general improvements label Oct 27, 2024
@smk78
Copy link
Contributor

smk78 commented Oct 28, 2024

To be in absolute units your intensities must have dimensions of inverse length. If you have Y-axis data in units of g/mol you are using derived units.

Some SasView models already report I(0), see the mono_gauss_coil & poly_gauss_coil, for example.

What you are asking for is already possible in SasView, you just need to rewrite or reparameterise the models you are using. As you say, I(0) is just a computation from other parameters.

Have a look at some of the examples in https://www.sasview.org/downloads/creating_custom_fitting_models_in_sasview_v5.pdf

@smk78 smk78 closed this as completed Oct 28, 2024
@smk78 smk78 removed the Enhancement Feature requests and/or general improvements label Oct 28, 2024
@marocco53
Copy link
Author

marocco53 commented Oct 28, 2024 via email

@marocco53
Copy link
Author

marocco53 commented Oct 28, 2024 via email

@smk78
Copy link
Contributor

smk78 commented Oct 29, 2024

Returning an I(0) value in inverse length is one thing. But returning an I(0) in units of g/mol requires a bunch of other information, for example bulk densities or concentrations (as opposed to volume fractions). Most models do not have these parameters.

@marocco53
Copy link
Author

marocco53 commented Oct 29, 2024 via email

@smk78
Copy link
Contributor

smk78 commented Oct 29, 2024

So, you mean that when a fit completes, you would like it to evaluate I(Q) at Q=0 using the parameters that have just been optimised and the known model function, and to report that I(0) in, say, the Log Explorer?
Potentially, that could be done, I guess. But it would not be a trivial amount of work. It would mean editing every model to a) compute the I(0) and b) define how I(0) is being calculated in the model documentation.
If you are only using a limited number of models, it would be quicker for you to rewrite/reparameterize an exist model in terms of I(0) instead of the scale parameter.
If, instead of running SasView by clicking on the icon, you open a command window, navigate to the SasView installation folder and then invoke the program by typing sasview, any output generated by the program should appear in the command window. So if you put print statements in a model they should appear. Alternatively, it is possible to run SasView from script or Jupyter notebook. Maybe one or other of these options would get you going?

@marocco53
Copy link
Author

marocco53 commented Oct 29, 2024 via email

@marocco53
Copy link
Author

marocco53 commented Nov 10, 2024 via email

@smk78
Copy link
Contributor

smk78 commented Nov 25, 2024

Sorry, @marocco53 , only just seen this latest comment from you.

You are now asking about something else unrelated to this particular Github issue, which is poor practice.

Please will you email [email protected] with the details of what you are trying to do and what you think is wrong. Attaching a pdf/powerpoint with screenshots and the steps to reproduce (and a dataset) would be helpful.

Thanks.

@smk78 smk78 added Enhancement Feature requests and/or general improvements Fitting Perspective Concerns the fitting perspective labels Nov 25, 2024
@marocco53
Copy link
Author

marocco53 commented Nov 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Feature requests and/or general improvements Fitting Perspective Concerns the fitting perspective
Projects
None yet
Development

No branches or pull requests

2 participants