From 3fe9280fc9d41623c2e518000ebf6c98ad760a54 Mon Sep 17 00:00:00 2001 From: knodlseder <> Date: Mon, 8 Aug 2011 22:01:33 +0000 Subject: [PATCH] fix also extended source model size --- scripts/cssens.py | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/scripts/cssens.py b/scripts/cssens.py index bb98be9..ac9bc45 100755 --- a/scripts/cssens.py +++ b/scripts/cssens.py @@ -349,26 +349,47 @@ class cssens(GApplication): if type == "point": spatial = GModelSpatialPtsrc(location) if fitpos: - spatial[0].free() - spatial[1].free() + spatial["RA"].free() + spatial["DEC"].free() + else: + spatial["RA"].fix() + spatial["DEC"].fix() source = GModelPointSource(spatial, spectrum) elif type == "gauss": radial = GModelRadialGauss(location, sigma) if fitpos: - radial[0].free() - radial[1].free() + radial["RA"].free() + radial["DEC"].free() + radial["Sigma"].free() + else: + radial["RA"].fix() + radial["DEC"].fix() + radial["Sigma"].fix() source = GModelExtendedSource(radial, spectrum) elif type == "disk": radial = GModelRadialDisk(location, radius) if fitpos: - radial[0].free() - radial[1].free() + if fitpos: + radial["RA"].free() + radial["DEC"].free() + radial["Radius"].free() + else: + radial["RA"].fix() + radial["DEC"].fix() + radial["Radius"].fix() source = GModelExtendedSource(radial, spectrum) elif type == "shell": radial = GModelRadialShell(location, radius, width) if fitpos: - radial[0].free() - radial[1].free() + radial["RA"].free() + radial["DEC"].free() + radial["Radius"].free() + radial["Width"].free() + else: + radial["RA"].fix() + radial["DEC"].fix() + radial["Radius"].fix() + radial["Width"].fix() source = GModelExtendedSource(radial, spectrum) else: self.log("ERROR: Unknown source type '"+type+"'.\n") -- libgit2 0.21.4