diff --git a/scripts/cssens.py b/scripts/cssens.py index f1c776a..cebcc21 100755 --- a/scripts/cssens.py +++ b/scripts/cssens.py @@ -347,52 +347,49 @@ class cssens(GApplication): # Set source if type == "point": - spatial = GModelSpatialPtsrc(location) + spatial = GModelSpatialPointSource(location) if fitpos: spatial["RA"].free() spatial["DEC"].free() else: spatial["RA"].fix() spatial["DEC"].fix() - source = GModelPointSource(spatial, spectrum) elif type == "gauss": - radial = GModelRadialGauss(location, self.m_radius) + spatial = GModelSpatialRadialGauss(location, self.m_radius) if fitpos: - radial["RA"].free() - radial["DEC"].free() - radial["Sigma"].free() + spatial["RA"].free() + spatial["DEC"].free() + spatial["Sigma"].free() else: - radial["RA"].fix() - radial["DEC"].fix() - radial["Sigma"].fix() - source = GModelExtendedSource(radial, spectrum) + spatial["RA"].fix() + spatial["DEC"].fix() + spatial["Sigma"].fix() elif type == "disk": - radial = GModelRadialDisk(location, self.m_radius) + spatial = GModelSpatialRadialDisk(location, self.m_radius) if fitpos: - radial["RA"].free() - radial["DEC"].free() - radial["Radius"].free() + spatial["RA"].free() + spatial["DEC"].free() + spatial["Radius"].free() else: - radial["RA"].fix() - radial["DEC"].fix() - radial["Radius"].fix() - source = GModelExtendedSource(radial, spectrum) + spatial["RA"].fix() + spatial["DEC"].fix() + spatial["Radius"].fix() elif type == "shell": - radial = GModelRadialShell(location, self.m_radius, self.m_width) + spatial = GModelSpatialRadialShell(location, self.m_radius, self.m_width) if fitpos: - radial["RA"].free() - radial["DEC"].free() - radial["Radius"].free() - radial["Width"].free() + spatial["RA"].free() + spatial["DEC"].free() + spatial["Radius"].free() + spatial["Width"].free() else: - radial["RA"].fix() - radial["DEC"].fix() - radial["Radius"].fix() - radial["Width"].fix() - source = GModelExtendedSource(radial, spectrum) + spatial["RA"].fix() + spatial["DEC"].fix() + spatial["Radius"].fix() + spatial["Width"].fix() else: self.log("ERROR: Unknown source type '"+type+"'.\n") return None + source = GModelSky(spatial, spectrum) # Set source name source.name("Test") diff --git a/scripts/cstsdist.py b/scripts/cstsdist.py index cd89c5f..2e631ee 100755 --- a/scripts/cstsdist.py +++ b/scripts/cstsdist.py @@ -3,7 +3,7 @@ # This script generates the TS distribution for a particular model based # on Monte-Carlo simulations. # -# Copyright (C) 2011 Jurgen Knodlseder +# Copyright (C) 2011-2013 Jurgen Knodlseder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -324,32 +324,29 @@ class cstsdist(GApplication): # Set source if type == "point": - spatial = GModelSpatialPtsrc(location) + spatial = GModelSpatialPointSource(location) if fitpos: spatial[0].free() spatial[1].free() - source = GModelPointSource(spatial, spectrum) elif type == "gauss": - radial = GModelRadialGauss(location, sigma) + spatial = GModelSpatialRadialGauss(location, sigma) if fitpos: - radial[0].free() - radial[1].free() - source = GModelExtendedSource(radial, spectrum) + spatial[0].free() + spatial[1].free() elif type == "disk": - radial = GModelRadialDisk(location, radius) + spatial = GModelSpatialRadialDisk(location, radius) if fitpos: - radial[0].free() - radial[1].free() - source = GModelExtendedSource(radial, spectrum) + spatial[0].free() + spatial[1].free() elif type == "shell": - radial = GModelRadialShell(location, radius, width) + spatial = GModelSpatialRadialShell(location, radius, width) if fitpos: - radial[0].free() - radial[1].free() - source = GModelExtendedSource(radial, spectrum) + spatial[0].free() + spatial[1].free() else: self.log("ERROR: Unknown source type '"+type+"'.\n") return None + source = GModelSky(spatial, spectrum) # Set source name source.name("Test")