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
785cb709
Commit
785cb709
authored
Sep 19, 2020
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plat_av moved to juobs_tools and lin_fit exported
parent
1bcd9f33
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
10 deletions
+13
-10
src/juobs.jl
src/juobs.jl
+2
-2
src/juobs_obs.jl
src/juobs_obs.jl
+0
-6
src/juobs_tools.jl
src/juobs_tools.jl
+11
-2
No files found.
src/juobs.jl
View file @
785cb709
...
...
@@ -7,7 +7,7 @@ include("juobs_tools.jl")
include
(
"juobs_obs.jl"
)
export
read_mesons
,
read_ms1
export
apply_rw
,
corr_obs
export
plat_av
,
meff
,
dec_const_pcvc
export
apply_rw
,
corr_obs
,
plat_av
,
lin_fit
export
meff
,
dec_const_pcvc
end
# module
src/juobs_obs.jl
View file @
785cb709
function
plat_av
(
obs
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
})
uwerr
.
(
obs
)
w
=
1
./
err
.
(
obs
)[
plat
[
1
]
:
plat
[
2
]]
.^
2
av
=
sum
(
w
.*
obs
[
plat
[
1
]
:
plat
[
2
]])
/
sum
(
w
)
return
av
end
function
meff
(
obs
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
};
pl
::
Bool
=
true
,
data
::
Bool
=
false
)
dim
=
length
(
obs
)
aux
=
log
.
(
obs
[
2
:
dim
-
2
]
./
obs
[
3
:
dim
-
1
])
...
...
src/juobs_tools.jl
View file @
785cb709
...
...
@@ -57,7 +57,14 @@ function corr_obs(cdata::Array{CData, 1}; real::Bool=true, rw::Union{Array{Array
return
Corr
(
obs
,
cdata
)
end
#TODO: interpolation
function
plat_av
(
obs
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
})
uwerr
.
(
obs
)
w
=
1
./
err
.
(
obs
)[
plat
[
1
]
:
plat
[
2
]]
.^
2
av
=
sum
(
w
.*
obs
[
plat
[
1
]
:
plat
[
2
]])
/
sum
(
w
)
return
av
end
function
lin_fit
(
x
::
Vector
{
Float64
},
v
::
Vector
{
Float64
},
e
::
Vector
{
Float64
})
sig2
=
e
.*
e
S
=
sum
(
1
./
sig2
)
...
...
@@ -79,4 +86,6 @@ function lin_fit(x::Vector{Float64}, y::Vector{uwreal})
(
fitp
,
csqexp
)
=
fit_error
(
chisq
,
value
.
(
par
),
y
)
return
(
fitp
,
csqexp
)
end
\ No newline at end of file
end
#TODO: interpolation
\ No newline at end of file
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