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
fbf1f3a0
Commit
fbf1f3a0
authored
3 years ago
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rw_info -> info
info==true && rw==nothing provides primary observable
parent
5eb61b12
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
src/juobs_obs.jl
src/juobs_obs.jl
+10
-6
src/juobs_tools.jl
src/juobs_tools.jl
+9
-5
No files found.
src/juobs_obs.jl
View file @
fbf1f3a0
...
...
@@ -461,7 +461,7 @@ t0_r = comp_t0(Y, [38, 58], L=32, rw=[rw1, rw2], pl=true)
"""
function
comp_t0
(
Y
::
YData
,
plat
::
Vector
{
Int64
};
L
::
Int64
,
pl
::
Bool
=
false
,
rw
::
Union
{
Matrix
{
Float64
},
Nothing
}
=
nothing
,
npol
::
Int64
=
2
,
ws
::
ADerrors
.
wspace
=
ADerrors
.
wsg
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
,
rw_
info
::
Bool
=
false
)
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
,
info
::
Bool
=
false
)
Ysl
=
Y
.
obs
t
=
Y
.
t
...
...
@@ -548,8 +548,10 @@ function comp_t0(Y::YData, plat::Vector{Int64}; L::Int64, pl::Bool=false,
title
(
string
(
L"
$
t/a^2 =
$
"
,
t
[
nt0
]))
display
(
gcf
())
end
if
rw_info
&&
!
isnothing
(
rw
)
(
t0
,
WY_aux
,
W_obs
)
if
info
&&
!
isnothing
(
rw
)
return
(
t0
,
WY_aux
,
W_obs
)
elseif
info
&&
isnothing
(
rw
)
return
(
t0
,
Y_aux
)
else
return
t0
end
...
...
@@ -557,7 +559,7 @@ end
function
comp_t0
(
Y
::
Vector
{
YData
},
plat
::
Vector
{
Int64
};
L
::
Int64
,
pl
::
Bool
=
false
,
rw
::
Union
{
Vector
{
Matrix
{
Float64
}},
Nothing
}
=
nothing
,
npol
::
Int64
=
2
,
ws
::
ADerrors
.
wspace
=
ADerrors
.
wsg
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
,
info
::
Bool
=
false
)
nr
=
length
(
Y
)
Ysl
=
getfield
.
(
Y
,
:
obs
)
...
...
@@ -658,8 +660,10 @@ function comp_t0(Y::Vector{YData}, plat::Vector{Int64}; L::Int64, pl::Bool=false
title
(
string
(
L"
$
t/a^2 =
$
"
,
t
[
nt0
]))
display
(
gcf
())
end
if
rw_info
&&
!
isnothing
(
rw
)
(
t0
,
WY_aux
,
W_obs
)
if
info
&&
!
isnothing
(
rw
)
return
(
t0
,
WY_aux
,
W_obs
)
elseif
info
&&
isnothing
(
rw
)
return
(
t0
,
Y_aux
)
else
return
t0
end
...
...
This diff is collapsed.
Click to expand it.
src/juobs_tools.jl
View file @
fbf1f3a0
...
...
@@ -81,7 +81,7 @@ corr_pp = corr_obs.(data)
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
,
rw_
info
::
Bool
=
false
)
function
corr_obs
(
cdata
::
CData
;
real
::
Bool
=
true
,
rw
::
Union
{
Array
{
Float64
,
2
},
Nothing
}
=
nothing
,
L
::
Int64
=
1
,
info
::
Bool
=
false
)
real
?
data
=
cdata
.
re_data
./
L
^
3
:
data
=
cdata
.
im_data
./
L
^
3
nt
=
size
(
data
)[
2
]
...
...
@@ -95,8 +95,10 @@ function corr_obs(cdata::CData; real::Bool=true, rw::Union{Array{Float64, 2}, No
obs
=
[
ow
[
x0
]
/
W_obs
for
x0
=
1
:
nt
]
end
if
rw_
info
&&
!
isnothing
(
rw
)
if
info
&&
!
isnothing
(
rw
)
return
(
Corr
(
obs
,
cdata
),
ow
,
W_obs
)
elseif
info
&&
isnothing
(
rw
)
return
(
Corr
(
obs
,
cdata
),
obs
)
else
return
Corr
(
obs
,
cdata
)
end
...
...
@@ -104,7 +106,7 @@ end
#function corr_obs for R != 1
#TODO: vcfg with gaps
function
corr_obs
(
cdata
::
Array
{
CData
,
1
};
real
::
Bool
=
true
,
rw
::
Union
{
Array
{
Array
{
Float64
,
2
},
1
},
Nothing
}
=
nothing
,
L
::
Int64
=
1
,
rw_
info
::
Bool
=
false
)
function
corr_obs
(
cdata
::
Array
{
CData
,
1
};
real
::
Bool
=
true
,
rw
::
Union
{
Array
{
Array
{
Float64
,
2
},
1
},
Nothing
}
=
nothing
,
L
::
Int64
=
1
,
info
::
Bool
=
false
)
nr
=
length
(
cdata
)
id
=
getfield
.
(
cdata
,
:
id
)
vcfg
=
getfield
.
(
cdata
,
:
vcfg
)
...
...
@@ -133,8 +135,10 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
W_obs
=
uwreal
(
tmp_W
,
id
[
1
],
replica
)
obs
=
[
ow
[
x0
]
/
W_obs
for
x0
=
1
:
nt
]
end
if
rw_
info
&&
!
isnothing
(
rw
)
if
info
&&
!
isnothing
(
rw
)
return
(
Corr
(
obs
,
cdata
),
ow
,
W_obs
)
elseif
info
&&
isnothing
(
rw
)
return
(
Corr
(
obs
,
cdata
),
obs
)
else
return
Corr
(
obs
,
cdata
)
end
...
...
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