[SciPy-User] Problem with sherpa fitting

Aldcroft, Thomas aldcroft at head.cfa.harvard.edu
Fri Jan 30 13:29:44 EST 2015


On Thu, Jan 29, 2015 at 2:23 PM, emmaonaw <emmadeona+sherpa at gmail.com>
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:

 http://cxc.harvard.edu/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
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20150130/b732361f/attachment.html>


More information about the SciPy-User mailing list