juliaastro / cfitsio.jl Goto Github PK
View Code? Open in Web Editor NEWC-style interface to the libcfitsio library.
License: MIT License
C-style interface to the libcfitsio library.
License: MIT License
When doing pkg> add CFITSIO
in Julia 1.0 to 1.2 (inclusive), I get the following error:
ERROR: failed to clone from CFITSIO,, error: GitError(Code:ERROR, Class:Net, unsupported URL protocol)
is it on purpose or is because no backward compatibility is possible?
The docs of fits_insert_img
states
One can force a new primary array to be inserted at the beginning of the FITS file by setting status = PREPEND_PRIMARY
except PREPEND_PRIMARY
is defined in a header file as
#define PREPEND_PRIMARY -9 /* used in ffiimg to insert new primary array */
and I don't think that this is exported (I can't find a corresponding symbol exported when I run nm
on the library). Perhaps we may just hardcode the symbol here, but is there any other way to access the symbol from the header file?
Hi,
I need to create FITS files where the first HDU is empty (only containing a header). Given the structure of fits_create_img I did not find a way to do this (please let me know if I overlooked something!). So I extended the code with the following:
function fits_create_empty_hdu(f::FITSFile)
status = Ref{Cint}(0)
naxesr = C_NULL
N = 0
bitpix = bitpix_from_type(Int16)
ccall(
(:ffcrimll, libcfitsio),
Cint,
(Ptr{Cvoid}, Cint, Cint, Ptr{Int64}, Ref{Cint}),
f.ptr,
bitpix,
N,
naxesr,
status,
)
fits_assert_ok(status[])
end
and a small fits_create_img
wrapper
function fits_create_img(f::FITSFile, a::Nothing)
status = fits_create_empty_hdu(f)
end
This appears to work ok but I am not sure whether this is superfluous. If it is useful, I'm happy to create a PR with this, but I must confess I am a tad uncertain about the logic of the runtests.jl
so if you have any hints on how to write a test conforming to the code preferences, I'd be happy to hear them!
This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml
to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix
on this issue.
I'll open a PR within a few hours, please be patient!
What if we just permuted data on read? I'd like to see the arguments against, but I would really prefer to see data in its row-major orientation by default.
In terms of implementation, I have no clue what the most efficient and transparent solution is besides calling permutedims
. I'm interested how PyCall.jl facilitates this when it hands off arrays to numpy.
cc @giordano
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.