IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pranav Sampathkumar
corsika
Commits
95688419
Commit
95688419
authored
4 years ago
by
Remy Prechelt
Browse files
Options
Downloads
Patches
Plain Diff
Make pandas the default file format and cleanup library.
parent
a4f8f2c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python/corsika/io/library.py
+0
-3
0 additions, 3 deletions
python/corsika/io/library.py
python/corsika/io/outputs/observation_plane.py
+9
-3
9 additions, 3 deletions
python/corsika/io/outputs/observation_plane.py
with
9 additions
and
6 deletions
python/corsika/io/library.py
+
0
−
3
View file @
95688419
...
...
@@ -179,9 +179,6 @@ class Library(object):
# type from the proccesses subdirectory
try
:
# create the name of the module containing this output class
# module_name = re.sub(r"(?<!^)(?=[A-Z])", "_", out_type).lower()
# instantiate the output and store it in our dict
component
=
getattr
(
outputs
,
out_type
)(
op
.
join
(
path
,
subdir
))
...
...
This diff is collapsed.
Click to expand it.
python/corsika/io/outputs/observation_plane.py
+
9
−
3
View file @
95688419
...
...
@@ -55,7 +55,7 @@ class ObservationPlane(Output):
"""
return
self
.
__data
is
not
None
and
self
.
__config
is
not
None
def
astype
(
self
,
dtype
:
str
=
"
pa
rquet
"
,
**
kwargs
:
Any
)
->
Any
:
def
astype
(
self
,
dtype
:
str
=
"
pa
ndas
"
,
**
kwargs
:
Any
)
->
Any
:
"""
Load the particle data from this observation plane.
...
...
@@ -71,7 +71,7 @@ class ObservationPlane(Output):
Any:
The return type of this method is determined by `dtype`.
"""
if
dtype
==
"
p
ar
quet
"
:
if
dtype
==
"
ar
row
"
:
return
self
.
__data
elif
dtype
==
"
pandas
"
:
return
self
.
__data
.
to_pandas
()
...
...
@@ -79,7 +79,7 @@ class ObservationPlane(Output):
raise
ValueError
(
(
f
"
Unknown format
'
{
dtype
}
'
for ObservationPlane.
"
"
We currently only support [
'
p
ar
quet
'
,
'
pandas
'
].
"
"
We currently only support [
'
ar
row
'
,
'
pandas
'
].
"
)
)
...
...
@@ -97,3 +97,9 @@ class ObservationPlane(Output):
The configuration file for this output.
"""
return
self
.
__config
def
__repr__
(
self
)
->
str
:
"""
Return a string representation of this class.
"""
return
f
"
ObservationPlane(
'
{
self
.
config
[
'
name
'
]
}
'
)
"
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