Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • $\begingroup$ What programming language do you work in? Furthermore, it is not entirely clear to me what you want as output, and I am unfamiliar with this 'nuproducts' tool. Why are the degrees, in which you have converted the pixel coordinates as you say in the EDIT, unsufficient? $\endgroup$ Commented Dec 7, 2017 at 12:19
  • $\begingroup$ I'm working in Julia now. Basically, NuSTAR data has to be calibrated before it's suitable for scientific analysis and there are a few stages to that calibration, one of the stages requires you to select a source region (as a .reg file, usually created by manually selecting an area using DS9) before you get the final fully calibrated/cleaned data. The FITS files store data as X Y pixel coordinates, but the region file needs to be in WCS, so I convert X, Y to FK5 angles. Problem now is that for converting the angle I get in degrees (which is correct) to hh:mm:ss is different to what DS9 outputs $\endgroup$ Commented Dec 7, 2017 at 12:22
  • $\begingroup$ How much is the discrepancy between DS9 output and what you get? $\endgroup$ Commented Dec 7, 2017 at 15:07
  • $\begingroup$ Aha, figured out what I did wrong, I was being stupid and converting degrees to h:m:s as if they were angles on a circle, which doesn't work for right-ascension since it goes from -90 to 90, not 0 to 360. Now that I've fixed it (here's a notebook where it works) it's still a bit off around 10^-5, but I guess that's just some floating point errors adding up along the way. $\endgroup$ Commented Dec 7, 2017 at 16:22