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
0f1d86e0
Commit
0f1d86e0
authored
Nov 04, 2020
by
Javier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
juobs_tools minor changes
doc updated + minor redefinition
parent
1bc3f110
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/juobs_tools.jl
src/juobs_tools.jl
+2
-2
No files found.
src/juobs_tools.jl
View file @
0f1d86e0
...
...
@@ -141,7 +141,7 @@ Computes the results of a linear interpolation/extrapolation in the y axis
y_lin_fit
(
par
::
Vector
{
uwreal
},
x
::
Union
{
uwreal
,
Float64
})
=
par
[
1
]
+
par
[
2
]
*
x
@doc
raw
"""
fit_routine(model::Function, ydata::Array{uwreal}, param::Int64=3)
fit_routine(model::Function,
xdata::Array{<:Real},
ydata::Array{uwreal}, param::Int64=3)
Given a model function with a number param of parameters and an array of uwreal,
this function fit ydata with the given model and print fit information
...
...
@@ -155,7 +155,7 @@ function fit_routine(model::Function, xdata::Array{<:Real}, ydata::Array{uwreal}
yer
=
err
.
(
ydata
)
chisq
=
gen_chisq
(
model
,
xdata
,
yer
)
fit
=
curve_fit
(
model
,
xdata
,
yval
,
1.0
./
yer
.^
2
,
fill
(
0.5
,
param
))
isnothing
(
wpm
)
?
(
upar
,
chi_exp
)
=
fit_error
(
chisq
,
coef
(
fit
),
ydata
)
:
(
upar
,
chi_exp
)
=
fit_error
(
chisq
,
coef
(
fit
),
ydata
,
wpm
)
(
upar
,
chi_exp
)
=
isnothing
(
wpm
)
?
fit_error
(
chisq
,
coef
(
fit
),
ydata
)
:
fit_error
(
chisq
,
coef
(
fit
),
ydata
,
wpm
)
for
i
=
1
:
length
(
upar
)
uwerr
(
upar
[
i
])
print
(
"
\n
Fit parameter: "
,
i
,
": "
)
...
...
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