Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OPOSSUM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
phelix
rust
OPOSSUM
Commits
f9a54dfb
Commit
f9a54dfb
authored
1 year ago
by
Udo Eisenbarth
Browse files
Options
Downloads
Patches
Plain Diff
work on from_csv fn.
parent
d313b63f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/spectrum.rs
+7
-2
7 additions, 2 deletions
src/spectrum.rs
with
7 additions
and
2 deletions
src/spectrum.rs
+
7
−
2
View file @
f9a54dfb
...
...
@@ -61,9 +61,14 @@ impl Spectrum {
pub
fn
from_csv
()
{
// Read an array back from the file
let
file
=
File
::
open
(
"NE03B.csv"
)
.unwrap
();
let
mut
reader
=
ReaderBuilder
::
new
()
.has_headers
(
true
)
.from_reader
(
file
);
let
mut
reader
=
ReaderBuilder
::
new
()
.has_headers
(
false
)
.delimiter
(
b';'
)
.from_reader
(
file
);
for
record
in
reader
.records
()
{
if
let
Ok
(
record
)
=
record
{
println!
(
"{:?} {:?}"
,
record
.get
(
0
),
record
.get
(
1
));
}
}
//let array_read: Array2<u64> = reader.deserialize_array2((2, 3)).unwrap();
println!
(
"{:?}"
,
read
er
);
//
println!("{:?}",
array_
read);
}
/// Returns the wavelength range of this [`Spectrum`].
pub
fn
range
(
&
self
)
->
Range
<
Length
>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment