Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cigale
CIGALE
Commits
bd31c1de
Commit
bd31c1de
authored
Jun 07, 2019
by
Médéric Boquien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use f-strings in pcigale-filters rather than regular string as they are easier to read.
parent
9b3ab44c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
pcigale_filters/__init__.py
pcigale_filters/__init__.py
+6
-6
No files found.
pcigale_filters/__init__.py
View file @
bd31c1de
...
...
@@ -62,8 +62,8 @@ def add_filters(fnames):
raise
ValueError
(
"Filter transmission type can only be "
"'energy' or 'photon'."
)
print
(
"Importing {
}... ({} points)"
.
format
(
filter_name
,
filter_table
.
shape
[
1
]
)
)
print
(
f
"Importing
{
filter_name
}
... "
f
"(
{
filter_table
.
shape
[
1
]
}
points)"
)
new_filter
=
Filter
(
filter_name
,
filter_description
,
filter_table
)
...
...
@@ -89,9 +89,9 @@ def del_filters(fnames):
for
fname
in
fnames
:
if
fname
in
names
:
base
.
del_filter
(
fname
)
print
(
"Removing filter {
}"
.
format
(
fname
)
)
print
(
f
"Removing filter
{
fname
}
"
)
else
:
print
(
"Filter {} not in the database"
.
format
(
fname
)
)
print
(
"Filter {
fname
} not in the database"
)
def
worker_plot
(
fname
):
...
...
@@ -110,9 +110,9 @@ def worker_plot(fname):
plt
.
minorticks_on
()
plt
.
xlabel
(
'Wavelength [nm]'
)
plt
.
ylabel
(
'Relative transmission'
)
plt
.
title
(
"{} filter"
.
format
(
fname
)
)
plt
.
title
(
f
"
{
fname
}
filter"
)
plt
.
tight_layout
()
plt
.
savefig
(
"{}.pdf"
.
format
(
fname
)
)
plt
.
savefig
(
f
"
{
fname
}
.pdf"
)
def
plot_filters
(
fnames
):
...
...
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