Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
CIGALE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cigale
CIGALE
Commits
418a1405
Commit
418a1405
authored
Sep 20, 2015
by
Médéric Boquien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimise imports. Cleanup done using PyCharm Community Edition.
parent
74809bca
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
65 additions
and
16 deletions
+65
-16
pcigale/analysis_modules/__init__.py
pcigale/analysis_modules/__init__.py
+1
-0
pcigale/analysis_modules/pdf_analysis/__init__.py
pcigale/analysis_modules/pdf_analysis/__init__.py
+0
-1
pcigale/analysis_modules/pdf_analysis/utils.py
pcigale/analysis_modules/pdf_analysis/utils.py
+0
-1
pcigale/analysis_modules/savefluxes/__init__.py
pcigale/analysis_modules/savefluxes/__init__.py
+1
-0
pcigale/analysis_modules/savefluxes/workers.py
pcigale/analysis_modules/savefluxes/workers.py
+0
-1
pcigale/creation_modules/bc03.py
pcigale/creation_modules/bc03.py
+2
-0
pcigale/creation_modules/casey2012.py
pcigale/creation_modules/casey2012.py
+2
-0
pcigale/creation_modules/dale2014.py
pcigale/creation_modules/dale2014.py
+1
-0
pcigale/creation_modules/dl2007.py
pcigale/creation_modules/dl2007.py
+2
-0
pcigale/creation_modules/dl2014.py
pcigale/creation_modules/dl2014.py
+2
-0
pcigale/creation_modules/dustatt_calzleit.py
pcigale/creation_modules/dustatt_calzleit.py
+2
-0
pcigale/creation_modules/dustatt_powerlaw.py
pcigale/creation_modules/dustatt_powerlaw.py
+2
-0
pcigale/creation_modules/fritz2006.py
pcigale/creation_modules/fritz2006.py
+2
-0
pcigale/creation_modules/loadfile.py
pcigale/creation_modules/loadfile.py
+1
-1
pcigale/creation_modules/m2005.py
pcigale/creation_modules/m2005.py
+2
-0
pcigale/creation_modules/mbb.py
pcigale/creation_modules/mbb.py
+2
-0
pcigale/creation_modules/nebular.py
pcigale/creation_modules/nebular.py
+3
-1
pcigale/creation_modules/param.py
pcigale/creation_modules/param.py
+2
-0
pcigale/creation_modules/radio.py
pcigale/creation_modules/radio.py
+2
-0
pcigale/creation_modules/redshifting.py
pcigale/creation_modules/redshifting.py
+1
-1
pcigale/creation_modules/sfh2exp.py
pcigale/creation_modules/sfh2exp.py
+3
-0
pcigale/creation_modules/sfh_buat08.py
pcigale/creation_modules/sfh_buat08.py
+3
-0
pcigale/creation_modules/sfh_quenching.py
pcigale/creation_modules/sfh_quenching.py
+3
-0
pcigale/creation_modules/sfhdelayed.py
pcigale/creation_modules/sfhdelayed.py
+3
-0
pcigale/creation_modules/sfhfromfile.py
pcigale/creation_modules/sfhfromfile.py
+2
-0
pcigale/creation_modules/sfhperiodic.py
pcigale/creation_modules/sfhperiodic.py
+2
-0
pcigale/data/__init__.py
pcigale/data/__init__.py
+1
-1
pcigale/sed/__init__.py
pcigale/sed/__init__.py
+3
-1
pcigale/session/configuration.py
pcigale/session/configuration.py
+6
-4
pcigale/warehouse/__init__.py
pcigale/warehouse/__init__.py
+1
-0
pcigale_filters/__init__.py
pcigale_filters/__init__.py
+4
-2
pcigale_plots/__init__.py
pcigale_plots/__init__.py
+4
-2
No files found.
pcigale/analysis_modules/__init__.py
View file @
418a1405
...
...
@@ -5,6 +5,7 @@
# Author: Yannick Roehlly & Denis Burgarella
from
importlib
import
import_module
import
numpy
as
np
from
astropy.table
import
Column
...
...
pcigale/analysis_modules/pdf_analysis/__init__.py
View file @
418a1405
...
...
@@ -42,7 +42,6 @@ from .workers import init_analysis as init_worker_analysis
from
.workers
import
analysis
as
worker_analysis
from
..utils
import
ParametersHandler
,
backup_dir
from
..utils
import
OUT_DIR
# Tolerance threshold under which any flux or error is considered as 0.
TOLERANCE
=
1e-12
...
...
pcigale/analysis_modules/pdf_analysis/utils.py
View file @
418a1405
...
...
@@ -9,7 +9,6 @@ from astropy import log
from
astropy.table
import
Table
,
Column
import
numpy
as
np
from
scipy.special
import
erf
from
scipy.stats
import
scoreatpercentile
from
..utils
import
OUT_DIR
...
...
pcigale/analysis_modules/savefluxes/__init__.py
View file @
418a1405
...
...
@@ -28,6 +28,7 @@ from ...warehouse import SedWarehouse
from
.workers
import
init_fluxes
as
init_worker_fluxes
from
.workers
import
fluxes
as
worker_fluxes
# Limit the redshift to this number of decimals
REDSHIFT_DECIMALS
=
2
...
...
pcigale/analysis_modules/savefluxes/workers.py
View file @
418a1405
...
...
@@ -10,7 +10,6 @@ import time
import
numpy
as
np
from
...warehouse
import
SedWarehouse
from
..utils
import
OUT_DIR
...
...
pcigale/creation_modules/bc03.py
View file @
418a1405
...
...
@@ -13,7 +13,9 @@ Populations.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
from
..data
import
Database
...
...
pcigale/creation_modules/casey2012.py
View file @
418a1405
...
...
@@ -13,8 +13,10 @@ This module implements the Casey (2012) infra-red models.
"""
from
collections
import
OrderedDict
import
numpy
as
np
import
scipy.constants
as
cst
from
.
import
CreationModule
...
...
pcigale/creation_modules/dale2014.py
View file @
418a1405
...
...
@@ -12,6 +12,7 @@ This module implements the Dale (2014) infra-red models.
"""
from
collections
import
OrderedDict
from
pcigale.data
import
Database
from
.
import
CreationModule
...
...
pcigale/creation_modules/dl2007.py
View file @
418a1405
...
...
@@ -13,7 +13,9 @@ This module implements the Draine and Li (2007) infra-red models.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
pcigale.data
import
Database
from
.
import
CreationModule
...
...
pcigale/creation_modules/dl2014.py
View file @
418a1405
...
...
@@ -13,7 +13,9 @@ This module implements the updated Draine and Li (2007) infrared models.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
pcigale.data
import
Database
from
.
import
CreationModule
...
...
pcigale/creation_modules/dustatt_calzleit.py
View file @
418a1405
...
...
@@ -14,7 +14,9 @@ attenuation formulae, adding an UV-bump and a power law.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
...
...
pcigale/creation_modules/dustatt_powerlaw.py
View file @
418a1405
...
...
@@ -14,7 +14,9 @@ in Charlot and Fall (2000) with a UV bump added.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
...
...
pcigale/creation_modules/fritz2006.py
View file @
418a1405
...
...
@@ -11,7 +11,9 @@ This module implements the Fritz et al. (2006) models.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
pcigale.data
import
Database
from
.
import
CreationModule
...
...
pcigale/creation_modules/loadfile.py
View file @
418a1405
...
...
@@ -11,8 +11,8 @@ This module reads a SED spectrum from a file.
"""
from
astropy.table
import
Table
from
collections
import
OrderedDict
from
..utils
import
read_table
from
.
import
CreationModule
...
...
pcigale/creation_modules/m2005.py
View file @
418a1405
...
...
@@ -12,7 +12,9 @@ This module implements the Maraston (2005) Single Stellar Populations.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
from
..data
import
Database
...
...
pcigale/creation_modules/mbb.py
View file @
418a1405
...
...
@@ -17,8 +17,10 @@ wavelength range.
"""
from
collections
import
OrderedDict
import
numpy
as
np
import
scipy.constants
as
cst
from
.
import
CreationModule
...
...
pcigale/creation_modules/nebular.py
View file @
418a1405
...
...
@@ -4,9 +4,11 @@
# Author: Médéric Boquien <mboquien@ast.cam.ac.uk>
from
collections
import
OrderedDict
import
numpy
as
np
from
pcigale.data
import
Database
import
scipy.constants
as
cst
from
pcigale.data
import
Database
from
.
import
CreationModule
...
...
pcigale/creation_modules/param.py
View file @
418a1405
...
...
@@ -16,7 +16,9 @@ for all the physical processes at play to build the received total emission.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
...
...
pcigale/creation_modules/radio.py
View file @
418a1405
...
...
@@ -18,8 +18,10 @@ This module implements the radio emission of galaxies, taking into account only
"""
from
collections
import
OrderedDict
import
numpy
as
np
import
scipy.constants
as
cst
from
.
import
CreationModule
...
...
pcigale/creation_modules/redshifting.py
View file @
418a1405
...
...
@@ -21,9 +21,9 @@ is changed, this module may need to be adapted.
import
numpy
as
np
from
scipy.constants
import
parsec
from
scipy.misc
import
factorial
from
astropy.cosmology
import
WMAP7
as
cosmology
from
..creation_modules
import
CreationModule
from
astropy.cosmology
import
WMAP7
as
cosmology
def
igm_transmission
(
wavelength
,
redshift
):
...
...
pcigale/creation_modules/sfh2exp.py
View file @
418a1405
...
...
@@ -13,9 +13,12 @@ decreasing exponentials.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE
=
1
...
...
pcigale/creation_modules/sfh_buat08.py
View file @
418a1405
...
...
@@ -22,9 +22,12 @@ and interpolate the values of a, b and c.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE
=
1
...
...
pcigale/creation_modules/sfh_quenching.py
View file @
418a1405
...
...
@@ -15,9 +15,12 @@ constant.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE
=
1
...
...
pcigale/creation_modules/sfhdelayed.py
View file @
418a1405
...
...
@@ -14,9 +14,12 @@ rise of the SFR up to a maximum, followed by an exponential decrease.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
# Time lapse used in the age grid in Myr. If should be consistent with the
# time lapse in the SSP modules.
AGE_LAPSE
=
1
...
...
pcigale/creation_modules/sfhfromfile.py
View file @
418a1405
...
...
@@ -12,7 +12,9 @@ This module reads the star formation history in a file.
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
..utils
import
read_table
from
.
import
CreationModule
...
...
pcigale/creation_modules/sfhperiodic.py
View file @
418a1405
...
...
@@ -15,7 +15,9 @@ decaying exponential, or "delayed".
"""
from
collections
import
OrderedDict
import
numpy
as
np
from
.
import
CreationModule
...
...
pcigale/data/__init__.py
View file @
418a1405
...
...
@@ -20,6 +20,7 @@ from sqlalchemy import create_engine, exc, Column, String, Float, PickleType
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.orm
import
class_mapper
,
sessionmaker
import
numpy
as
np
from
.filters
import
Filter
from
.m2005
import
M2005
from
.bc03
import
BC03
...
...
@@ -30,7 +31,6 @@ from .fritz2006 import Fritz2006
from
.nebular_continuum
import
NebularContinuum
from
.nebular_lines
import
NebularLines
DATABASE_FILE
=
pkg_resources
.
resource_filename
(
__name__
,
'data.db'
)
ENGINE
=
create_engine
(
'sqlite:///'
+
DATABASE_FILE
,
echo
=
False
)
...
...
pcigale/sed/__init__.py
View file @
418a1405
...
...
@@ -31,12 +31,14 @@ Such SED is characterised by:
"""
import
numpy
as
np
from
scipy.constants
import
c
,
parsec
from
.
import
utils
from
.io.vo
import
save_sed_to_vo
from
scipy.constants
import
c
,
parsec
from
..data
import
Database
# Time lapse used to compute the average star formation rate. We use a
# constant to keep it easily changeable for advanced user while limiting the
# number of parameters. The value is in Myr.
...
...
pcigale/session/configuration.py
View file @
418a1405
...
...
@@ -3,14 +3,16 @@
# Licensed under the CeCILL-v2 licence - see Licence_CeCILL_V2-en.txt
# Author: Yannick Roehlly
import
configobj
import
pkg_resources
import
pkgutil
import
collections
import
multiprocessing
as
mp
import
numpy
as
np
from
glob
import
glob
# To allow the use of glob() in "eval..."
from
textwrap
import
wrap
import
configobj
from
glob
import
glob
# To allow the use of glob() in "eval..."
import
pkg_resources
import
numpy
as
np
from
..data
import
Database
from
..utils
import
read_table
from
..
import
creation_modules
...
...
pcigale/warehouse/__init__.py
View file @
418a1405
...
...
@@ -4,6 +4,7 @@
# Author: Yannick Roehlly
import
marshal
from
..sed
import
SED
from
..
import
creation_modules
...
...
pcigale_filters/__init__.py
View file @
418a1405
...
...
@@ -4,13 +4,15 @@
# Author: Médéric Boquien
import
argparse
import
multiprocessing
as
mp
import
sys
from
astropy.table
import
Table
,
Column
import
astropy.units
as
u
import
matplotlib.pyplot
as
plt
import
multiprocessing
as
mp
import
numpy
as
np
from
pcigale.data
import
Database
,
Filter
import
sys
__version__
=
"0.1-alpha"
...
...
pcigale_plots/__init__.py
View file @
418a1405
...
...
@@ -7,17 +7,19 @@
# Author: Yannick Roehlly, Médéric Boquien & Denis Burgarella
import
argparse
from
astropy.table
import
Table
from
itertools
import
product
,
repeat
from
collections
import
OrderedDict
from
astropy.table
import
Table
import
matplotlib
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
as
plt
import
multiprocessing
as
mp
import
numpy
as
np
import
os
import
pkg_resources
from
scipy.constants
import
c
,
parsec
from
scipy.constants
import
c
from
pcigale.data
import
Database
from
pcigale.utils
import
read_table
from
pcigale.session.configuration
import
Configuration
...
...
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