Hi Mosè,
Welcome to Julia! Looks like you’ve gotten up to speed with the language very fast. Here are some comments after a quick look at AstroLib.jl:
For functions like aitoff
, to achieve performance and get the “vectorized” version to return two vectors rather than a vector of tuples, I would explicitly write the vectorized method. Something like this:
function aitoff{T<:Number}(l::AbstractVector{T}, b::AbstractVector{T})
@assert length(l) == length(b)
x = similar(l)
y = similar(l)
for i in eachindex(l)
x[i], y[i] = aitoff(l[i], b[i])
end
return x, y
end
For functions taking only one argument, check out the @vectorize_1arg
method.
As you probably realize, some functionality in the IDL library AstroLib has overlap with existing Julia packages. For example, FITSIO.jl would be a natural place for FITS-related functionality; it would be great if you could contribute any missing FITS-related functionality there.
Best,
— Kyle
--
You received this message because you are subscribed to the Google Groups "Julia Astro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-astro...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.