{"action":"reopened","issue":{"url":"https://api.github.com/repos/nanograv/PINT/issues/93","repository_url":"https://api.github.com/repos/nanograv/PINT","labels_url":"https://api.github.com/repos/nanograv/PINT/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/nanograv/PINT/issues/93/comments","events_url":"https://api.github.com/repos/nanograv/PINT/issues/93/events","html_url":"https://github.com/nanograv/PINT/issues/93","id":131050214,"number":93,"title":"Problem with set_params","user":{"login":"paulray","id":1771428,"avatar_url":"https://avatars.githubusercontent.com/u/1771428?v=3","gravatar_id":"","url":"https://api.github.com/users/paulray","html_url":"https://github.com/paulray","followers_url":"https://api.github.com/users/paulray/followers","following_url":"https://api.github.com/users/paulray/following{/other_user}","gists_url":"https://api.github.com/users/paulray/gists{/gist_id}","starred_url":"https://api.github.com/users/paulray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulray/subscriptions","organizations_url":"https://api.github.com/users/paulray/orgs","repos_url":"https://api.github.com/users/paulray/repos","events_url":"https://api.github.com/users/paulray/events{/privacy}","received_events_url":"https://api.github.com/users/paulray/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2016-02-03T15:00:58Z","updated_at":"2016-02-05T23:26:40Z","closed_at":null,"body":"My code is crashing when trying to print a model as a parfile after doing some fitting (with my own fitter).\r\nThe issue seems to come down to `set_params()` in fitter.py.  A simple example is below.\r\n```\r\nmyfit = pint.fitter.fitter(toas=ts,model=modelin)\r\nmyfit.set_params({'T0':55000.0})\r\nmyfit.model.as_parfile()\r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-24-e212f792c2fb> in <module>()\r\n----> 1 myfit.model.as_parfile()\r\n\r\n/Users/paulr/src/PINT/pint/models/timing_model.pyc in as_parfile(self)\r\n    328         result = \"\"\r\n    329         for par in self.params:\r\n--> 330             result += getattr(self, par).as_parfile_line()\r\n    331         # Always include UNITS in par file. For now, PINT only supports TDB\r\n    332         result += \"UNITS TDB\"\r\n\r\n/Users/paulr/src/PINT/pint/models/parameter.pyc in as_parfile_line(self)\r\n    198         if self.value is None:\r\n    199             return \"\"\r\n--> 200         line = \"%-15s %25s\" % (self.name, self.print_value(self.value))\r\n    201         if self.uncertainty is not None:\r\n    202             line += \" %d %s\" % (0 if self.frozen else 1, str(self.uncertainty))\r\n\r\n/Users/paulr/src/PINT/pint/utils.pyc in time_to_mjd_string(t, prec)\r\n    133     astropy does not seem to provide this capability (yet?).\r\n    134     \"\"\"\r\n--> 135     jd1 = t.jd1 - erfa.DJM0\r\n    136     imjd = int(jd1)\r\n    137     fjd1 = jd1 - imjd\r\n\r\nAttributeError: 'float' object has no attribute 'jd1'\r\n```\r\n\r\nOf course, it works if instead I do this:\r\n```\r\nmyfit.set_params({'T0':astropy.time.Time(55000.0,scale='utc',format='mjd')})\r\n```\r\n\r\nBut fitters usually work with bare numbers, not quantities (or times or angles). So, should `set_params` be setting `num_value` instead of value?  I'm not sure how it is  supposed to work with all the new changes recently.\r\n\r\nThoughts?"}}