From df52fcb6a81695125cf50be086d084bee5a56061 Mon Sep 17 00:00:00 2001 From: astellhorn <93910032+astellhorn@users.noreply.github.com> Date: Fri, 19 Jan 2024 17:43:06 +0100 Subject: [PATCH] model without magnetic sld --- sasmodels/models/ParallelepipedChain.c | 23 +---------------------- sasmodels/models/ParallelepipedChain.py | 4 +--- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/sasmodels/models/ParallelepipedChain.c b/sasmodels/models/ParallelepipedChain.c index 4676a024..c9ffbc0f 100644 --- a/sasmodels/models/ParallelepipedChain.c +++ b/sasmodels/models/ParallelepipedChain.c @@ -120,7 +120,6 @@ static double Iqabc(double qa, double qb, double qc, double sld, double solvent_sld, - double mag_sld, double length_a, double length_b, double length_c, @@ -131,9 +130,7 @@ Iqabc(double qa, double qb, double qc, const double siC = sas_sinx_x(0.5*length_c*qc); const double V = form_volume(length_a, length_b, length_c); const double drho = (sld - solvent_sld); - const double mrho = mag_sld const double Amp = V * drho * siA * siB * siC; - const double MAmp = V * mrho * siA * siB * siC; // adding several particles in the chain: double VolumeFraction = 1.0; @@ -147,15 +144,10 @@ Iqabc(double qa, double qb, double qc, // Just start parameters: double SingletIntensity = 0; - double MSingletIntensity = 0; double DimerIntensity = 0; - double MDimerIntensity = 0; double TrimerIntensity = 0; - double MTrimerIntensity = 0; double QuadramerIntensity = 0; - double MQuadramerIntensity = 0; double PentamerIntensity = 0; - double MPentamerIntensity = 0; // we take out: (i) polydispersity of chains (called "anglewt/sigma" before), (ii) orientation of chain (called "Viewing angle") // Now: chain only oriented along Qx @@ -172,8 +164,6 @@ Iqabc(double qa, double qb, double qc, double real_phase = 1.0; double img_phase = 0.0; - double mreal_phase = 1.0; - double mimg_phase = 0.0; for(int k=1; k<5; k++){ real_phase += cos(k*Length*(Q_X*ChainProjX + Q_Y*ChainProjY)); @@ -181,19 +171,15 @@ Iqabc(double qa, double qb, double qc, if(k==1){ DimerIntensity += pow(Amp*img_phase,2))/(2.0*Vol); - MDimerIntensity += pow(MAmp*mimg_phase,2))/(2.0*Vol); } if(k==2){ TrimerIntensity += pow(Amp*img_phase,2))/(3.0*Vol); - MTrimerIntensity += pow(MAmp*mimg_phase,2))/(3.0*Vol); } if(k==3){ QuadramerIntensity += pow(Amp*img_phase,2))/(4.0*Vol); - MQuadramerIntensity += pow(MAmp*mimg_phase,2))/(4.0*Vol); } if(k==4){ PentamerIntensity += pow(Amp*img_phase,2))/(5.0*Vol); - MPentamerIntensity += pow(MAmp*mimg_phase,2))/(5.0*Vol); } } //end k loop for dimers @@ -202,15 +188,8 @@ Iqabc(double qa, double qb, double qc, if(FractionScale == 0){FractionScale = 1.0;} double SIntensity = SingletFraction*SingletIntensity + DimerFraction*DimerIntensity + TrimerFraction*TrimerIntensity + QuadramerFraction*QuadramerIntensity + PentamerFraction*PentamerIntensity; - double MIntensity = 0.0; - if(MVar <= 1){ - MIntensity = MSingletIntensity*(SingletFraction + DimerFraction + TrimerFraction + QuadramerFraction + PentamerFraction); - } - else{ - MIntensity = SingletFraction*MSingletIntensity + DimerFraction*MDimerIntensity + TrimerFraction*MTrimerIntensity + QuadramerFraction*MQuadramerIntensity + PentamerFraction*MPentamerIntensity; - } - double Intensity = (SIntensity+MIntensity)*(1E4)/FractionScale; + double Intensity = (SIntensity)*(1E4)/FractionScale; return Intensity; diff --git a/sasmodels/models/ParallelepipedChain.py b/sasmodels/models/ParallelepipedChain.py index 48c07b47..f0220aa1 100644 --- a/sasmodels/models/ParallelepipedChain.py +++ b/sasmodels/models/ParallelepipedChain.py @@ -44,7 +44,7 @@ from numpy import inf name = "ParallelepipedChain" -title = "Base-script: Rectangular parallelepiped with uniform scattering length density. Add-on: Chain of parallelepipeds along x-direction, with uniform magnetic scattering length density (no applied magnetic field)" +title = "Base-script: Rectangular parallelepiped. Add-on: Chain of parallelepipeds along x-direction" description = """User model for chains of parallelepipeds oriented along X-axis""" category = "shape:parallelepiped" @@ -53,8 +53,6 @@ "Parallelepiped scattering length density"], ["sld_solvent", "1e-6/Ang^2", 1, [-inf, inf], "sld", "Solvent scattering length density"], - ["mag_sld", "1e-6/Ang^2", 1, [-inf, inf], "sld", - "magnetic scattering length density"], ["length_a", "Ang", 35, [0, inf], "length", "Shorter side of the parallelepiped"], ["length_b", "Ang", 75, [0, inf], "length",