Comments (5)
Hello, thanks -- would be great to have you submit this as a PR!
from rht.
Hi!
I, too, seek this function. I presume we read in data we seek from the original fits file, and then add it to the header at the section around line ~ 283, although I'm not precisely sure yet how.
I'm pretty sure it's more extensive than that, since most functions use all the parameter as arguments, like getXYT and putXYT, and stuff like match_only.
Is this not something worth expanding to?
I'll look into this a bit more.
Rutger
from rht.
Hi!
So... I lack the expertise of actually doing this nicely with stuff like using the original input file path, but I did achieve the functionality I wanted. In putXYT() there are the following lines:
# Other Header Values
prihdr['NTHETA'] = ntheta
Below these lines I read in my own header and then pass anything I want. In my case, it was RA and DEC, including units and whatnot:
my_header = fits.getheader("/some_folder/maybe_another_folder/your_file.fits")
prihdr["CTYPE1"] = my_header["CTYPE1"]
prihdr["CRVAL1"] = my_header["CRVAL1"]
prihdr["CDELT1"] = my_header["CDELT1"]
prihdr["CRPIX1"] = my_header["CRPIX1"]
prihdr["CUNIT1"] = my_header["CUNIT1"]
prihdr["CTYPE2"] = my_header["CTYPE2"]
prihdr["CRVAL2"] = my_header["CRVAL2"]
prihdr["CDELT2"] = my_header["CDELT2"]
prihdr["CRPIX2"] = my_header["CRPIX2"]
prihdr["CUNIT2"] = my_header["CUNIT2"]
Then running rht.py with your input file the same as the file where the header is loaded from of course, gives you the desired functionality.
It might be interesting to you @issantos
Cheers!
Rutger
from rht.
Hi both! Thank you for your work on this. @issantos do you think this settles the issue or is more functionality called for?
from rht.
For the record, @issantos, this was also implemented by commit #19
from rht.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rht.