Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Javier Ugarrio
juobs
Commits
ebccaa83
Commit
ebccaa83
authored
2 years ago
by
Alejandro Saez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flagged strange
parent
04dfee39
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
src/juobs_tools.jl
src/juobs_tools.jl
+32
-1
No files found.
src/juobs_tools.jl
View file @
ebccaa83
...
@@ -21,6 +21,35 @@ function apply_rw(data::Vector{<:Array{Float64}}, W::Vector{Matrix{Float64}})
...
@@ -21,6 +21,35 @@ function apply_rw(data::Vector{<:Array{Float64}}, W::Vector{Matrix{Float64}})
return
(
data_r
,
rw
)
return
(
data_r
,
rw
)
end
end
function
apply_rw_flagged_strange
(
data
::
Array
{
Float64
},
id
::
String
)
if
id
==
"J303r003"
||
id
==
"J303"
flagged_cfg
=
[
324
,
325
,
326
]
for
i
in
flagged_cfg
data
[
i
,
:
]
=
-
data
[
i
,
:
]
end
elseif
id
==
"H105r005"
flagged_cfg
=
[
254
,
255
,
256
,
257
,
259
,
260
,
261
,
264
,
265
,
266
,
269
,
280
,
282
,
283
,
284
,
285
,
286
,
287
,
288
,
289
,
291
,
299
,
301
,
313
,
314
,
315
,
316
,
331
,
332
,
333
,
334
,
335
,
336
,
337
,
338
,
339
,
340
,
341
,
342
]
for
i
in
flagged_cfg
data
[
i
,
:
]
=
-
data
[
i
,
:
]
end
end
return
data
end
function
apply_rw_flagged_strange
(
data
::
Vector
{
<:
Array
{
Float64
}},
id
::
String
)
if
id
==
"H105r001"
||
id
==
"H105"
flagged_cfg_r001
=
[
100
,
105
,
106
]
flagged_cfg_r002
=
[
1
]
for
i
in
flagged_cfg_r001
data
[
1
][
i
,
:
]
=
-
data
[
1
][
i
,
:
]
end
for
i
in
flagged_cfg_r002
data
[
2
][
i
,
:
]
=
-
data
[
2
][
i
,
:
]
end
end
return
data
end
function
check_corr_der
(
obs
::
Corr
,
derm
::
Vector
{
Corr
};
new_version
::
Bool
=
false
)
function
check_corr_der
(
obs
::
Corr
,
derm
::
Vector
{
Corr
};
new_version
::
Bool
=
false
)
g1
=
Vector
{
String
}(
undef
,
0
)
g1
=
Vector
{
String
}(
undef
,
0
)
g2
=
Vector
{
String
}(
undef
,
0
)
g2
=
Vector
{
String
}(
undef
,
0
)
...
@@ -96,7 +125,7 @@ corr_pp = corr_obs.(data)
...
@@ -96,7 +125,7 @@ corr_pp = corr_obs.(data)
corr_pp_r = corr_obs.(data, rw=[rw1, rw2])
corr_pp_r = corr_obs.(data, rw=[rw1, rw2])
```
```
"""
"""
function
corr_obs
(
cdata
::
CData
;
real
::
Bool
=
true
,
rw
::
Union
{
Array
{
Float64
,
2
},
Nothing
}
=
nothing
,
L
::
Int64
=
1
,
info
::
Bool
=
false
)
function
corr_obs
(
cdata
::
CData
;
real
::
Bool
=
true
,
rw
::
Union
{
Array
{
Float64
,
2
},
Nothing
}
=
nothing
,
L
::
Int64
=
1
,
info
::
Bool
=
false
,
flagged_strange
::
Bool
=
false
)
real
?
data
=
cdata
.
re_data
./
L
^
3
:
data
=
cdata
.
im_data
./
L
^
3
real
?
data
=
cdata
.
re_data
./
L
^
3
:
data
=
cdata
.
im_data
./
L
^
3
nt
=
size
(
data
)[
2
]
nt
=
size
(
data
)[
2
]
...
@@ -104,6 +133,7 @@ function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, No
...
@@ -104,6 +133,7 @@ function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, No
if
isnothing
(
rw
)
if
isnothing
(
rw
)
obs
=
[
uwreal
(
data
[
:
,
x0
],
cdata
.
id
)
for
x0
=
1
:
nt
]
obs
=
[
uwreal
(
data
[
:
,
x0
],
cdata
.
id
)
for
x0
=
1
:
nt
]
else
else
flagged_strange
?
data
=
apply_rw_flagged_strange
(
data
,
cdata
.
id
)
:
nothing
data_r
,
W
=
apply_rw
(
data
,
rw
)
data_r
,
W
=
apply_rw
(
data
,
rw
)
ow
=
[
uwreal
(
data_r
[
:
,
x0
],
cdata
.
id
)
for
x0
=
1
:
nt
]
ow
=
[
uwreal
(
data_r
[
:
,
x0
],
cdata
.
id
)
for
x0
=
1
:
nt
]
W_obs
=
uwreal
(
W
,
cdata
.
id
)
W_obs
=
uwreal
(
W
,
cdata
.
id
)
...
@@ -139,6 +169,7 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
...
@@ -139,6 +169,7 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
[
tmp
=
cat
(
tmp
,
data
[
k
],
dims
=
1
)
for
k
=
2
:
nr
]
[
tmp
=
cat
(
tmp
,
data
[
k
],
dims
=
1
)
for
k
=
2
:
nr
]
obs
=
[
uwreal
(
tmp
[
:
,
x0
],
id
[
1
],
replica
)
for
x0
=
1
:
nt
]
obs
=
[
uwreal
(
tmp
[
:
,
x0
],
id
[
1
],
replica
)
for
x0
=
1
:
nt
]
else
else
flagged_strange
?
data
=
apply_rw_flagged_strange
(
data
,
cdata
[
1
]
.
id
)
:
nothing
data_r
,
W
=
apply_rw
(
data
,
rw
)
data_r
,
W
=
apply_rw
(
data
,
rw
)
tmp
=
data_r
[
1
]
tmp
=
data_r
[
1
]
tmp_W
=
W
[
1
]
tmp_W
=
W
[
1
]
...
...
This diff is collapsed.
Click to expand it.
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