Problem with sherpa fitting

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with sherpa fitting

emmaonaw
Hi,

I don't know if this is the right forum to ask but I cannot find any forum where to get help with sherpa fitting, so here I go :).
I am trying to fit an image using a model of background, PSF and gaussian source, using sherpa in python.
I set up my model using the standard tools:

show_all()

Data Set: 1
Filter: Circle(112.75,164.45,111.12)
name      = filename.fits
x0        = Float64[97344]
x1        = Float64[97344]
y         = Float32[97344]
shape     = (312, 312)
staterror = None
syserror  = None
sky       = None
eqpos     = world
 crval    = [ 278.5712,  -7.067 ]
 crpix    = [ 157., 157.]
 cdelt    = [ 0.009, 0.009]
 crota    = 0
 epoch    = 2000
 equinox  = 2000
coord     = logical

Model: 1
(tablemodel.bkgmap + usermodel.Src1)
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   bkgmap.ampl  thawed            1 -3.40282e+38  3.40282e+38          
   Src1.sigma1  frozen       7.0006            1           30          
   Src1.ampl    thawed           10         -100       100000          
   Src1.size    thawed      10.0009            0      55.5603          
   Src1.xpos    thawed      146.943      124.719      169.167          
   Src1.ypos    thawed      158.894      136.608       181.18          

and everything looks okay until I try to fit():

ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py", line 776, in structured_traceback
    records = _fixed_getinnerframes(etb, context, tb_offset)
  File "/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py", line 230, in wrapped
    return f(*args, **kwargs)
AssertionError

Unfortunately, your original traceback can not be constructed.

I am stuck here, tried several things but not really sure how to continue debugging this, any ideas? is it possible crval should be positive?
Thanks a lot
Emma
Reply | Threaded
Open this post in threaded view
|

Re: Problem with sherpa fitting

John ZuHone
Hi Emma,

You might have more luck at the AstroPy mailing list:


Even better, send a ticket to the CXC Helpdesk:


Best,

John

On Jan 29, 2015, at 2:23 PM, emmaonaw <[hidden email]> wrote:

Hi,

I don't know if this is the right forum to ask but I cannot find any forum
where to get help with sherpa fitting, so here I go :).
I am trying to fit an image using a model of background, PSF and gaussian
source, using sherpa in python.
I set up my model using the standard tools:

show_all()

Data Set: 1
Filter: Circle(112.75,164.45,111.12)
name      = filename.fits
x0        = Float64[97344]
x1        = Float64[97344]
y         = Float32[97344]
shape     = (312, 312)
staterror = None
syserror  = None
sky       = None
eqpos     = world
crval    = [ 278.5712,  -7.067 ]
crpix    = [ 157., 157.]
cdelt    = [ 0.009, 0.009]
crota    = 0
epoch    = 2000
equinox  = 2000
coord     = logical

Model: 1
(tablemodel.bkgmap + usermodel.Src1)
  Param        Type          Value          Min          Max      Units
  -----        ----          -----          ---          ---      -----
  bkgmap.ampl  thawed            1 -3.40282e+38  3.40282e+38           
  Src1.sigma1  frozen       7.0006            1           30           
  Src1.ampl    thawed           10         -100       100000           
  Src1.size    thawed      10.0009            0      55.5603           
  Src1.xpos    thawed      146.943      124.719      169.167           
  Src1.ypos    thawed      158.894      136.608       181.18           

and everything looks okay until I try to fit():

ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
 File
"/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py",
line 776, in structured_traceback
   records = _fixed_getinnerframes(etb, context, tb_offset)
 File
"/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py",
line 230, in wrapped
   return f(*args, **kwargs)
AssertionError

Unfortunately, your original traceback can not be constructed.

I am stuck here, tried several things but not really sure how to continue
debugging this, any ideas? is it possible crval should be positive?
Thanks a lot
Emma




--
View this message in context: http://scipy-user.10969.n7.nabble.com/Problem-with-sherpa-fitting-tp19935.html
Sent from the Scipy-User mailing list archive at Nabble.com.
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem with sherpa fitting

emmaonaw
Thanks for quick answer John, I will look into that
Cheers
e
Reply | Threaded
Open this post in threaded view
|

Re: Problem with sherpa fitting

Tom Aldcroft
In reply to this post by emmaonaw

On Thu, Jan 29, 2015 at 2:23 PM, emmaonaw <[hidden email]> wrote:
Hi,

I don't know if this is the right forum to ask but I cannot find any forum
where to get help with sherpa fitting, so here I go :).

Hi Emma,

The official place to get help for sherpa fitting is through the Chandra X-ray Center helpdesk:


In order to get a reasonable traceback, in the current version of sherpa you need to set an option in your sherpa config file.  This file is ~/.sherpa.rc in your home directory, and you need the lines:

[verbosity]
# Sherpa Chatter level: a non-zero value will display full error traceback
level      : 2000

Cheers,
Tom

 
I am trying to fit an image using a model of background, PSF and gaussian
source, using sherpa in python.
I set up my model using the standard tools:

show_all()

Data Set: 1
Filter: Circle(112.75,164.45,111.12)
name      = filename.fits
x0        = Float64[97344]
x1        = Float64[97344]
y         = Float32[97344]
shape     = (312, 312)
staterror = None
syserror  = None
sky       = None
eqpos     = world
 crval    = [ 278.5712,  -7.067 ]
 crpix    = [ 157., 157.]
 cdelt    = [ 0.009, 0.009]
 crota    = 0
 epoch    = 2000
 equinox  = 2000
coord     = logical

Model: 1
(tablemodel.bkgmap + usermodel.Src1)
   Param        Type          Value          Min          Max      Units
   -----        ----          -----          ---          ---      -----
   bkgmap.ampl  thawed            1 -3.40282e+38  3.40282e+38
   Src1.sigma1  frozen       7.0006            1           30
   Src1.ampl    thawed           10         -100       100000
   Src1.size    thawed      10.0009            0      55.5603
   Src1.xpos    thawed      146.943      124.719      169.167
   Src1.ypos    thawed      158.894      136.608       181.18

and everything looks okay until I try to fit():

ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File
"/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py",
line 776, in structured_traceback
    records = _fixed_getinnerframes(etb, context, tb_offset)
  File
"/Users/emma/anaconda/lib/python2.7/site-packages/IPython/core/ultratb.py",
line 230, in wrapped
    return f(*args, **kwargs)
AssertionError

Unfortunately, your original traceback can not be constructed.

I am stuck here, tried several things but not really sure how to continue
debugging this, any ideas? is it possible crval should be positive?
Thanks a lot
Emma




--
View this message in context: http://scipy-user.10969.n7.nabble.com/Problem-with-sherpa-fitting-tp19935.html
Sent from the Scipy-User mailing list archive at Nabble.com.
_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user


_______________________________________________
SciPy-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/scipy-user