Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
isisscripts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
20
Issues
20
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
remeis
isisscripts
Commits
aa9cab0b
Commit
aa9cab0b
authored
Jul 21, 2023
by
Ole Koenig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
foucalc: Add normalized CPD to output structure
parent
fef2a1b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
src/data/timing/foucalc.sl
src/data/timing/foucalc.sl
+10
-1
No files found.
src/data/timing/foucalc.sl
View file @
aa9cab0b
...
...
@@ -99,7 +99,9 @@ define foucalc()
_for i (1, numchan, 1)
_for j (i+1, numchan, 1)
fieldnames = [fieldnames, ["realcpd", "imagcpd", "errrealcpd", "errimagcpd", "noicpd", "rawcof", "cof", "errcof", "lag", "errlag"]+string(i)+string(j)]; % assuming i < j < 100 ...
fieldnames = [fieldnames, ["normrealcpd", "normimagcpd", "errnormrealcpd", "errnormimagcpd",
"realcpd", "imagcpd", "errrealcpd", "errimagcpd", "noicpd",
"rawcof", "cof", "errcof", "lag", "errlag"]+string(i)+string(j)]; % assuming i < j < 100 ...
variable fouquant = @Struct_Type(fieldnames); % create structure
variable rmsquant = @Struct_Type(rms_fieldnames);
...
...
@@ -226,6 +228,13 @@ define foucalc()
set_struct_field(fouquant, "errrealcpd"+lostr+histr, Real(errcpd));
set_struct_field(fouquant, "errimagcpd"+lostr+histr, Imag(errcpd));
variable tempnormcpd = normpsd(cpd, normtype, sqrt(avgrate[lo-1]*avgrate[hi-1]), sqrt(avgbkg[lo-1]*avgbkg[hi-1]), tseg, dimseg);
variable temperrnormcpd = errcpd / cpd[0] * tempnormcpd[0];
set_struct_field(fouquant, "normrealcpd"+lostr+histr, Real(tempnormcpd));
set_struct_field(fouquant, "errnormrealcpd"+lostr+histr, Real(temperrnormcpd));
set_struct_field(fouquant, "normimagcpd"+lostr+histr, Imag(tempnormcpd));
set_struct_field(fouquant, "errnormimagcpd"+lostr+histr, Imag(temperrnormcpd));
% use SIGPSD to calculate the cross power density noise
variable sigpsd_lo = get_struct_field(fouquant, "sigpsd"+lostr);
variable sigpsd_hi = get_struct_field(fouquant, "sigpsd"+histr);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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