Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
km3irf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
km3py
km3irf
Commits
2c2f941f
Commit
2c2f941f
authored
2 years ago
by
Mikhail Smirnov
Browse files
Options
Downloads
Patches
Plain Diff
Update get_file.py
parent
2d370884
Branches
1-addition-to-readme
Branches containing commit
Tags
v3.2.3
Tags containing commit
1 merge request
!3
Path to fits files
Pipeline
#27807
passed with warnings
2 years ago
Stage: test
Stage: coverage
Stage: doc
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/km3irf/get_file.py
+3
-4
3 additions, 4 deletions
src/km3irf/get_file.py
with
3 additions
and
4 deletions
src/km3irf/get_file.py
+
3
−
4
View file @
2c2f941f
...
...
@@ -5,15 +5,14 @@ from os import listdir
from
os.path
import
isfile
,
join
,
dirname
def
list_of_files
():
# print(__file__)
'''
return list of fits files
'''
mypath
=
dirname
(
__file__
)
+
"
/data
"
# print(mypath)
onlyfiles
=
[
f
for
f
in
listdir
(
mypath
)
if
isfile
(
join
(
mypath
,
f
))]
return
onlyfiles
# print(onlyfiles)
def
path_to
(
file_name
:
str
):
'''
return path to the chosen file
'''
current_path
=
dirname
(
__file__
)
+
f
"
/data/
{
file_name
}
"
return
current_path
\ No newline at end of file
return
current_path
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