Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Godoy, William
jexio
Commits
41369c9a
Commit
41369c9a
authored
Sep 15, 2020
by
William F Godoy
Browse files
Add 4th column
parent
c9b49413
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/extractor/AmrexCastro.jl
View file @
41369c9a
...
@@ -116,6 +116,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
...
@@ -116,6 +116,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
Yd_Level0
::
Array
{
Float64
,
1
}
=
[]
Yd_Level0
::
Array
{
Float64
,
1
}
=
[]
caseIDs
::
Array
{
String
,
1
}
=
[]
caseIDs
::
Array
{
String
,
1
}
=
[]
caseDirs
::
Array
{
String
,
1
}
=
[]
outputDirs
=
helper_get_prefix_directories
(
extractor
.
outputPrefix
)
outputDirs
=
helper_get_prefix_directories
(
extractor
.
outputPrefix
)
...
@@ -149,7 +150,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
...
@@ -149,7 +150,10 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
push!
(
Yd
,
plotsSize
)
push!
(
Yd
,
plotsSize
)
# caseID
# caseID
push!
(
caseIDs
,
string
(
caseID
,
"/"
,
helper_get_relative_path
(
plotFileDir
)
)
)
push!
(
caseIDs
,
caseID
)
# caseDir
push!
(
caseDirs
,
helper_get_relative_path
(
plotFileDir
)
)
counter
=
counter
+
1
counter
=
counter
+
1
end
end
...
@@ -158,7 +162,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
...
@@ -158,7 +162,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
data
=
[(
Xd
,
Yd
)]
data
=
[(
Xd
,
Yd
)]
df
::
DataFrames
.
DataFrame
=
DataFrames
.
DataFrame
(
plots_cells
=
Xd
,
plots_size
=
Yd
,
caseID
=
caseIDs
)
df
::
DataFrames
.
DataFrame
=
DataFrames
.
DataFrame
(
plots_cells
=
Xd
,
plots_size
=
Yd
,
caseID
=
caseIDs
,
caseDir
=
caseDirs
)
println
(
df
)
println
(
df
)
CSV
.
write
(
"plot_size.csv"
,
df
,
header
=
true
)
CSV
.
write
(
"plot_size.csv"
,
df
,
header
=
true
)
...
@@ -167,7 +171,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
...
@@ -167,7 +171,7 @@ function _run_linear_models_plots_size_step(extractor::AmrexCastro, X::DataFrame
end
end
# dead function
function
_run_linear_model_plots_size
(
extractor
::
AmrexCastro
,
X
::
DataFrames
.
DataFrame
)
function
_run_linear_model_plots_size
(
extractor
::
AmrexCastro
,
X
::
DataFrames
.
DataFrame
)
outputDirs
=
helper_get_prefix_directories
(
extractor
.
outputPrefix
)
outputDirs
=
helper_get_prefix_directories
(
extractor
.
outputPrefix
)
...
...
src/helper/helperFlux.jl
View file @
41369c9a
...
@@ -47,7 +47,7 @@ function FluxTrain(nepocs::Int32, X::Array{Float64,1}, Y::Array{Float64,1})
...
@@ -47,7 +47,7 @@ function FluxTrain(nepocs::Int32, X::Array{Float64,1}, Y::Array{Float64,1})
plot!
(
Xd
'
,
Yd_0
'
,
lc
=
:
green
,
label
=
L"y_0"
)
plot!
(
Xd
'
,
Yd_0
'
,
lc
=
:
green
,
label
=
L"y_0"
)
plot!
(
Xd
'
,
Yd_nE
'
,
lc
=
:
red
,
label
=
L"y_{n_\mathrm{E}}"
)
plot!
(
Xd
'
,
Yd_nE
'
,
lc
=
:
red
,
label
=
L"y_{n_\mathrm{E}}"
)
plot!
(
xlabel
=
L"x"
,
ylabel
=
L"y"
,
title
=
"Data for linear model"
)
plot!
(
xlabel
=
L"x"
,
ylabel
=
L"y"
,
title
=
"Data for linear model"
)
gui
()
end
end
...
...
src/helper/helperPlot.jl
0 → 100644
View file @
41369c9a
import
CSV
import
DataFrames
using
Plots
function
plot_CSV_3col
(
filename
::
String
)
df
=
CSV
.
File
(
filename
)
|>
DataFrames
.
DataFrame
x
=
df
[
!
,
1
]
y
=
df
[
!
,
2
]
z
=
df
[
!
,
3
]
display
(
Plots
.
scatter
(
x
,
y
,
groups
=
z
,
xaxis
=:
log
,
yaxis
=:
log
,
legendfontsize
=
9
,
legend
=
:
outertopleft
,
# [shapes], size, alpha
marker
=
([
:
x
:+
:
star4
:
vline
:
square
:
circle
],
7
,
1.0
),
xlabel
=
"cumulative output ncells ( output_counter x ncells )"
,
ylabel
=
"cumulative output data size (bytes)"
,
title
=
"Amrex Castr Sedov hydro test output size"
,
size
=
(
1200
,
850
)
)
)
readline
()
end
function
main
()
# modify this to the file path
filename
=
"/home/wgodoy/hdd_home/work/proxy_io/AmrexCastro/plot_size.csv"
plot_CSV_3col
(
filename
)
end
main
()
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