Skip to content

Commit fb79959

Browse files
committed
Add truncated octahedron (python+C) model updated (trying to remove the Nan issue again)
1 parent b0c14de commit fb79959

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

sasmodels/models/octahedron_truncated.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,6 @@ Fq(double q,
172172
// Convert from [1e-12 A-1] to [cm-1] and account for SLD units (1e-6/Ang^2)
173173
*F1 = 1e-2 * s * outer_sum_F1;
174174
*F2 = 1e-4 * s * s * outer_sum_F2;
175-
176-
if (isnan(*F1) || isinf(*F1)) {
177-
*F1 = 0.0;
178-
}
179-
if (isnan(*F2) || isinf(*F2)) {
180-
*F2 = 0.0;
181-
}
182175
}
183176

184177

@@ -216,11 +209,5 @@ Iqabc(double qa, double qb, double qc,
216209

217210

218211
// Convert from [1e-12 A-1] to [cm-1]
219-
double result = 1.0e-4 * square(s * AP);
220-
221-
if (isnan(result) || isinf(result)) {
222-
return 0.0;
223-
}
224-
225-
return result;
212+
return 1.0e-4 * square(s * AP);
226213
}

0 commit comments

Comments
 (0)