Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coenen, Joachim
Frida
Commits
0276094f
Commit
0276094f
authored
8 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
ditto for msa
parent
21bed78a
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pub/CHANGELOG
+1
-0
1 addition, 0 deletions
pub/CHANGELOG
pub/lib/commands.cpp
+4
-1
4 additions, 1 deletion
pub/lib/commands.cpp
pub/lib/manip.cpp
+9
-8
9 additions, 8 deletions
pub/lib/manip.cpp
pub/lib/manip.hpp
+1
-1
1 addition, 1 deletion
pub/lib/manip.hpp
with
15 additions
and
10 deletions
pub/CHANGELOG
+
1
−
0
View file @
0276094f
...
...
@@ -8,6 +8,7 @@ Release 2.3.6a of :
- Command crp to restrict plot range
- New integral operations firstwith, lastwith
- Improved functionality:
- In binning (mpa, msa), computation of sampling error is now optional
- Commands gp, gf, gp!, gf!, gfa to create, overwrite, or append to graphic file
- Integral operations now return integers when appropriate
- Cleaner implementation of refined curve plotting
...
...
This diff is collapsed.
Click to expand it.
pub/lib/commands.cpp
+
4
−
1
View file @
0276094f
...
...
@@ -466,6 +466,7 @@ bool frida_command(string cmd)
" msd delete
\n
"
" msr retain
\n
"
" msa average
\n
"
" msas average, error estimate includes sampling error
\n
"
" msb break into files
\n
"
" msj join
\n
"
" ms* spawn spectra
\n
"
...
...
@@ -518,7 +519,9 @@ bool frida_command(string cmd)
}
else
if
(
cmd
==
"msr"
)
{
NManip
::
slices_select
(
false
);
}
else
if
(
cmd
==
"msa"
)
{
NManip
::
slices_rebin
();
NManip
::
slices_rebin
(
false
);
}
else
if
(
cmd
==
"msas"
)
{
NManip
::
slices_rebin
(
true
);
}
else
if
(
cmd
==
"msb"
)
{
NManip
::
slices_break
();
}
else
if
(
cmd
==
"msj"
)
{
...
...
This diff is collapsed.
Click to expand it.
pub/lib/manip.cpp
+
9
−
8
View file @
0276094f
...
...
@@ -116,7 +116,7 @@ void NManip::points_select(const bool sel_del)
//! Bin points.
void
NManip
::
points_rebin
(
const
bool
sampling_err
or
)
void
NManip
::
points_rebin
(
const
bool
sampling_err
)
{
FileIterator
fiter
(
SFSel
::
instance
()
->
selD
());
...
...
@@ -142,7 +142,7 @@ void NManip::points_rebin(const bool sampling_error)
throw
S
(
"First bin must start at 0"
);
breaks
.
push_back
(
sin
->
size
());
PSpec
sout
=
sin
->
binned
(
breaks
,
sampling_err
or
);
PSpec
sout
=
sin
->
binned
(
breaks
,
sampling_err
);
fout
->
V
.
push_back
(
move
(
sout
));
}
...
...
@@ -153,7 +153,7 @@ void NManip::points_rebin(const bool sampling_error)
//! Bin points.
void
NManip
::
points_rebin_by_factor
(
const
bool
sampling_err
or
)
void
NManip
::
points_rebin_by_factor
(
const
bool
sampling_err
)
{
FileIterator
fiter
(
SFSel
::
instance
()
->
selD
());
static
int
ng
=
2
;
...
...
@@ -175,7 +175,7 @@ void NManip::points_rebin_by_factor(const bool sampling_error)
for
(
int
iout
=
0
;
iout
<
nout
+
1
;
++
iout
)
breaks
[
iout
]
=
iout
*
ng
;
PSpec
sout
=
sin
->
binned
(
breaks
,
sampling_err
or
);
PSpec
sout
=
sin
->
binned
(
breaks
,
sampling_err
);
fout
->
V
.
push_back
(
move
(
sout
));
}
...
...
@@ -597,7 +597,7 @@ void NManip::slices_select(const bool sel_del)
//! Bin spectra.
void
NManip
::
slices_rebin
()
void
NManip
::
slices_rebin
(
const
bool
sampling_err
)
{
FileIterator
fiter
(
SFSel
::
instance
()
->
sel
());
vector
<
int
>
JSel
;
...
...
@@ -639,7 +639,7 @@ void NManip::slices_rebin()
if
(
fd
)
{
PSpec
sout
(
new
CSpec
());
bool
in_with_dy
=
fd
->
VS
(
ji
)
->
has_dy
();
bool
out_with_dy
=
in_with_dy
||
mj
>
1
;
bool
out_with_dy
=
in_with_dy
||
(
sampling_err
&&
mj
>
1
)
;
int
n
=
fd
->
nPts
(
ji
);
sout
->
resize
(
n
,
out_with_dy
);
// x grids must be equal:
...
...
@@ -677,10 +677,11 @@ void NManip::slices_rebin()
for
(
int
jj
=
ji
;
jj
<
jf
;
jj
++
)
{
if
(
fd
->
VS
(
jj
)
->
has_dy
())
vm_src
+=
SQR
(
fd
->
VS
(
jj
)
->
dy
[
i
]);
vm_grp
+=
SQR
(
fd
->
VS
(
jj
)
->
y
[
i
]
-
ym
);
if
(
sampling_err
)
vm_grp
+=
SQR
(
fd
->
VS
(
jj
)
->
y
[
i
]
-
ym
);
}
double
vm
=
vm_src
/
mj
/
mj
;
if
(
mj
>
1
)
if
(
sampling_err
&&
mj
>
1
)
vm
+=
vm_grp
/
(
mj
-
1
);
sout
->
dy
[
i
]
=
sqrt
(
vm
);
}
...
...
This diff is collapsed.
Click to expand it.
pub/lib/manip.hpp
+
1
−
1
View file @
0276094f
...
...
@@ -28,7 +28,7 @@ void points_remove_err();
void
points_interpolate
();
void
points_redistribute
();
void
slices_select
(
const
bool
sel_del
);
void
slices_rebin
();
void
slices_rebin
(
const
bool
sampling_err
);
void
slices_merge
();
void
slices_break
();
void
slices_spawn
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment