{"action":"created","issue":{"url":"https://api.github.com/repos/giacomov/astromodels/issues/15","repository_url":"https://api.github.com/repos/giacomov/astromodels","labels_url":"https://api.github.com/repos/giacomov/astromodels/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/giacomov/astromodels/issues/15/comments","events_url":"https://api.github.com/repos/giacomov/astromodels/issues/15/events","html_url":"https://github.com/giacomov/astromodels/issues/15","id":174705825,"number":15,"title":"Fixing values of XSPEC function parameters","user":{"login":"drJfunk","id":6764007,"avatar_url":"https://avatars.githubusercontent.com/u/6764007?v=3","gravatar_id":"","url":"https://api.github.com/users/drJfunk","html_url":"https://github.com/drJfunk","followers_url":"https://api.github.com/users/drJfunk/followers","following_url":"https://api.github.com/users/drJfunk/following{/other_user}","gists_url":"https://api.github.com/users/drJfunk/gists{/gist_id}","starred_url":"https://api.github.com/users/drJfunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drJfunk/subscriptions","organizations_url":"https://api.github.com/users/drJfunk/orgs","repos_url":"https://api.github.com/users/drJfunk/repos","events_url":"https://api.github.com/users/drJfunk/events{/privacy}","received_events_url":"https://api.github.com/users/drJfunk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-02T08:21:26Z","updated_at":"2016-09-02T09:25:05Z","closed_at":"2016-09-02T08:22:52Z","body":"When running the example **Joint fitting XRT and GBM data with XSPEC models**, I am no longer able to fix the values of XSPEC functions. It appears as if they are only floats and not model objects:\r\n\r\n```\r\nxspec_abund('angr')\r\n\r\nspectral_model =  XS_phabs()* XS_zphabs() * XS_powerlaw()\r\n\r\n\r\nspectral_model.nh_1_1=0.101\r\nspectral_model.nh_1_1.fix = True\r\n\r\nspectral_model.nh_2_2=0.1114424\r\nspectral_model.nh_2_2.fix = True\r\n\r\nspectral_model.redshift_2_2 = 0.618\r\nspectral_model.redshift_2_2.fix =True\r\n```\r\n\r\nResult:\r\n\r\n```\r\nWARNING NonExistingAttribute: Attribute nh_1_1 does not exist. Check for typos.\r\n\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-12-587577dd4140> in <module>()\r\n      5 \r\n      6 spectral_model.nh_1_1=0.101\r\n----> 7 spectral_model.nh_1_1.fix = True\r\n      8 \r\n      9 spectral_model.nh_2_2=0.1114424\r\n\r\nAttributeError: 'float' object has no attribute 'fix'\r\n\r\n```\r\n\r\n\r\nNote: This does not seem to affect normal astromodel models."},"comment":{"url":"https://api.github.com/repos/giacomov/astromodels/issues/comments/244327215","html_url":"https://github.com/giacomov/astromodels/issues/15#issuecomment-244327215","issue_url":"https://api.github.com/repos/giacomov/astromodels/issues/15","id":244327215,"user":{"login":"drJfunk","id":6764007,"avatar_url":"https://avatars.githubusercontent.com/u/6764007?v=3","gravatar_id":"","url":"https://api.github.com/users/drJfunk","html_url":"https://github.com/drJfunk","followers_url":"https://api.github.com/users/drJfunk/followers","following_url":"https://api.github.com/users/drJfunk/following{/other_user}","gists_url":"https://api.github.com/users/drJfunk/gists{/gist_id}","starred_url":"https://api.github.com/users/drJfunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drJfunk/subscriptions","organizations_url":"https://api.github.com/users/drJfunk/orgs","repos_url":"https://api.github.com/users/drJfunk/repos","events_url":"https://api.github.com/users/drJfunk/events{/privacy}","received_events_url":"https://api.github.com/users/drJfunk/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T09:25:05Z","updated_at":"2016-09-02T09:25:05Z","body":"Cool. It is much nicer!\n\n\n> On Sep 2, 2016, at 10:48 AM, Giacomo Vianello <notifications@github.com> wrote:\n> \n> yeah, I found the name _1_1 or _2_1 confusing.\n> \n> Now the number is directly related to the component. So parameters of component 2 are called _2, which is more intuitive.\n> \n> You can see the number of components if you call .display(), as for example:\n> \n> XS_phabs{1} * Power_law{2}\n> \n> —\n> You are receiving this because you modified the open/close state.\n> Reply to this email directly, view it on GitHub <https://github.com/giacomov/astromodels/issues/15#issuecomment-244319055>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AGc157dkuxINL3JZpUykx8Ojwq4FpIGBks5ql-LLgaJpZM4JzebB>.\n> \n\n+++++++++++++++++++++++++++++++\nJ Michael Burgess\n+46 72-381 30 20\njmichaelburgess@gmail.com\n\n\n"}}
{"actor":{"display_login":"drJfunk"}}