Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
b2a2bf8d
Commit
b2a2bf8d
authored
Nov 16, 2011
by
Thomas White
Browse files
partialator: Add --no-scale option
parent
8737092e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/hrs-scaling.c
View file @
b2a2bf8d
...
...
@@ -407,13 +407,20 @@ static void calculate_esds(struct image *images, int n, RefList *full,
/* Scale the stack of images */
RefList
*
scale_intensities
(
struct
image
*
images
,
int
n
,
RefList
*
gref
,
int
n_threads
)
int
n_threads
,
int
noscale
)
{
int
i
;
double
max_corr
;
RefList
*
full
=
NULL
;
const
int
min_redundancy
=
3
;
if
(
noscale
)
{
for
(
i
=
0
;
i
<
n
;
i
++
)
images
[
i
].
osf
=
1
.
0
;
full
=
lsq_intensities
(
images
,
n
,
n_threads
);
calculate_esds
(
images
,
n
,
full
,
n_threads
,
min_redundancy
);
return
full
;
}
/* No reference -> create an initial list to refine against */
if
(
gref
==
NULL
)
{
full
=
lsq_intensities
(
images
,
n
,
n_threads
);
...
...
src/hrs-scaling.h
View file @
b2a2bf8d
...
...
@@ -21,7 +21,8 @@
#include
"image.h"
extern
RefList
*
scale_intensities
(
struct
image
*
images
,
int
n
,
RefList
*
reference
,
int
n_threads
);
RefList
*
reference
,
int
n_threads
,
int
noscale
);
#endif
/* HRS_SCALING_H */
src/partialator.c
View file @
b2a2bf8d
...
...
@@ -58,6 +58,7 @@ static void show_help(const char *s)
" an HDF5 file.
\n
"
" -y, --symmetry=<sym> Merge according to symmetry <sym>.
\n
"
" -n, --iterations=<n> Run <n> cycles of scaling and post-refinement.
\n
"
" --no-scale Fix all the scaling factors at unity.
\n
"
" -r, --reference=<file> Refine images against reflections in <file>,
\n
"
" instead of taking the mean of the intensity
\n
"
" estimates.
\n
"
...
...
@@ -279,6 +280,7 @@ int main(int argc, char *argv[])
int
have_reference
=
0
;
char
cmdline
[
1024
];
SRContext
*
sr
;
int
noscale
=
0
;
/* Long options */
const
struct
option
longopts
[]
=
{
...
...
@@ -289,6 +291,7 @@ int main(int argc, char *argv[])
{
"beam"
,
1
,
NULL
,
'b'
},
{
"symmetry"
,
1
,
NULL
,
'y'
},
{
"iterations"
,
1
,
NULL
,
'n'
},
{
"no-scale"
,
0
,
&
noscale
,
1
},
{
"reference"
,
1
,
NULL
,
'r'
},
{
0
,
0
,
NULL
,
0
}
};
...
...
@@ -485,8 +488,9 @@ int main(int argc, char *argv[])
/* Make initial estimates */
STATUS
(
"Performing initial scaling.
\n
"
);
if
(
noscale
)
STATUS
(
"Scale factors fixed at 1.
\n
"
);
full
=
scale_intensities
(
images
,
n_usable_patterns
,
reference
,
nthreads
);
nthreads
,
noscale
);
sr
=
sr_titlepage
(
images
,
n_usable_patterns
,
"scaling-report.pdf"
,
infile
,
cmdline
);
...
...
@@ -524,7 +528,7 @@ int main(int argc, char *argv[])
/* Re-estimate all the full intensities */
reflist_free
(
full
);
full
=
scale_intensities
(
images
,
n_usable_patterns
,
reference
,
nthreads
);
reference
,
nthreads
,
noscale
);
sr_iteration
(
sr
,
i
+
1
,
images
,
n_usable_patterns
,
full
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment