Commit dd746253 authored by Marcus Wirtz's avatar Marcus Wirtz
Browse files

[cosmic_rays] Set default value of 'initializer' to None

parent 0c9461d9
Pipeline #215187 passed with stages
in 4 minutes and 35 seconds
......@@ -70,7 +70,7 @@ def change_nametype2object(data, name_to_be_retyped, new_type=object):
class DataContainer(object):
""" Data container class meant for inheritance """
def __init__(self, initializer):
def __init__(self, initializer=None):
self.type = "Container"
# needed for the iteration
self._current_idx = 0 # type: int
......
......@@ -100,7 +100,7 @@ def plot_energy_spectrum(crs, xlabel='log$_{10}$(Energy / eV)', ylabel='entries'
class CosmicRaysBase(container.DataContainer):
""" Cosmic rays base class meant for inheritance """
def __init__(self, initializer, coord_system='gal'):
def __init__(self, initializer=None, coord_system='gal'):
# Inherits all functionalities from container.DataContainer object
super(CosmicRaysBase, self).__init__(initializer)
self.type = "CosmicRays"
......@@ -267,7 +267,7 @@ class CosmicRaysBase(container.DataContainer):
class CosmicRaysSets(CosmicRaysBase):
"""Set of cosmic rays """
def __init__(self, nsets, ncrs=None):
def __init__(self, nsets=None, ncrs=None):
self.type = "CosmicRaysSet"
if nsets is None:
CosmicRaysBase.__init__(self, initializer=None)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment