Skip to content

Instantly share code, notes, and snippets.

@Gnimuc
Last active March 27, 2020 16:04
Show Gist options
  • Save Gnimuc/c5122a7ba4c65652465858b07f0ea85a to your computer and use it in GitHub Desktop.
Save Gnimuc/c5122a7ba4c65652465858b07f0ea85a to your computer and use it in GitHub Desktop.
module LibGnuastro
using Gnuastro_jll
export Gnuastro_jll
using CEnum
const Ctm = Base.Libc.TmStruct
const Ctime_t = UInt
const Cclock_t = UInt
include(joinpath(@__DIR__, "libgnuastro_common.jl"))
include(joinpath(@__DIR__, "libgnuastro_api.jl"))
foreach(names(@__MODULE__, all=true)) do s
if startswith(string(s), "gal_") || startswith(string(s), "GAL_")
@eval export $s
end
end
end # module
# Julia wrapper for header: arithmetic.h
# Automatically generated using Clang.jl
function gal_arithmetic_operator_string(operator)
ccall((:gal_arithmetic_operator_string, libgnuastro), Cstring, (Cint,), operator)
end
function gal_arithmetic_set_operator(string, num_operands)
ccall((:gal_arithmetic_set_operator, libgnuastro), Cint, (Cstring, Ptr{Csize_t}), string, num_operands)
end
# Julia wrapper for header: array.h
# Automatically generated using Clang.jl
function gal_array_name_recognized(name)
ccall((:gal_array_name_recognized, libgnuastro), Cint, (Cstring,), name)
end
function gal_array_name_recognized_multiext(name)
ccall((:gal_array_name_recognized_multiext, libgnuastro), Cint, (Cstring,), name)
end
function gal_array_read(filename, extension, lines, minmapsize, quietmmap)
ccall((:gal_array_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, Csize_t, Cint), filename, extension, lines, minmapsize, quietmmap)
end
function gal_array_read_to_type(filename, extension, lines, type, minmapsize, quietmmap)
ccall((:gal_array_read_to_type, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, UInt8, Csize_t, Cint), filename, extension, lines, type, minmapsize, quietmmap)
end
function gal_array_read_one_ch(filename, extension, lines, minmapsize, quietmmap)
ccall((:gal_array_read_one_ch, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, Csize_t, Cint), filename, extension, lines, minmapsize, quietmmap)
end
function gal_array_read_one_ch_to_type(filename, extension, lines, type, minmapsize, quietmmap)
ccall((:gal_array_read_one_ch_to_type, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, UInt8, Csize_t, Cint), filename, extension, lines, type, minmapsize, quietmmap)
end
# Julia wrapper for header: binary.h
# Automatically generated using Clang.jl
function gal_binary_erode(input, num, connectivity, inplace)
ccall((:gal_binary_erode, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cint, Cint), input, num, connectivity, inplace)
end
function gal_binary_dilate(input, num, connectivity, inplace)
ccall((:gal_binary_dilate, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cint, Cint), input, num, connectivity, inplace)
end
function gal_binary_open(input, num, connectivity, inplace)
ccall((:gal_binary_open, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cint, Cint), input, num, connectivity, inplace)
end
function gal_binary_connected_components(binary, out, connectivity)
ccall((:gal_binary_connected_components, libgnuastro), Csize_t, (Ptr{gal_data_t}, Ptr{Ptr{gal_data_t}}, Cint), binary, out, connectivity)
end
function gal_binary_connected_indexs(binary, connectivity)
ccall((:gal_binary_connected_indexs, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cint), binary, connectivity)
end
function gal_binary_connected_adjacency_matrix(adjacency, numnewlabs)
ccall((:gal_binary_connected_adjacency_matrix, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{Csize_t}), adjacency, numnewlabs)
end
function gal_binary_holes_label(input, connectivity, numholes)
ccall((:gal_binary_holes_label, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cint, Ptr{Csize_t}), input, connectivity, numholes)
end
function gal_binary_holes_fill(input, connectivity, maxsize)
ccall((:gal_binary_holes_fill, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cint, Csize_t), input, connectivity, maxsize)
end
# Julia wrapper for header: blank.h
# Automatically generated using Clang.jl
function gal_blank_write(pointer, type)
ccall((:gal_blank_write, libgnuastro), Cvoid, (Ptr{Cvoid}, UInt8), pointer, type)
end
function gal_blank_alloc_write(type)
ccall((:gal_blank_alloc_write, libgnuastro), Ptr{Cvoid}, (UInt8,), type)
end
function gal_blank_initialize(input)
ccall((:gal_blank_initialize, libgnuastro), Cvoid, (Ptr{gal_data_t},), input)
end
function gal_blank_initialize_array(array, size, type)
ccall((:gal_blank_initialize_array, libgnuastro), Cvoid, (Ptr{Cvoid}, Csize_t, UInt8), array, size, type)
end
function gal_blank_as_string(type, width)
ccall((:gal_blank_as_string, libgnuastro), Cstring, (UInt8, Cint), type, width)
end
function gal_blank_is(pointer, type)
ccall((:gal_blank_is, libgnuastro), Cint, (Ptr{Cvoid}, UInt8), pointer, type)
end
function gal_blank_present(input, updateflag)
ccall((:gal_blank_present, libgnuastro), Cint, (Ptr{gal_data_t}, Cint), input, updateflag)
end
function gal_blank_number(input, updateflag)
ccall((:gal_blank_number, libgnuastro), Csize_t, (Ptr{gal_data_t}, Cint), input, updateflag)
end
function gal_blank_flag(data)
ccall((:gal_blank_flag, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), data)
end
function gal_blank_flag_apply(input, flag)
ccall((:gal_blank_flag_apply, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_data_t}), input, flag)
end
function gal_blank_remove(data)
ccall((:gal_blank_remove, libgnuastro), Cvoid, (Ptr{gal_data_t},), data)
end
function gal_blank_remove_realloc(input)
ccall((:gal_blank_remove_realloc, libgnuastro), Cvoid, (Ptr{gal_data_t},), input)
end
# Julia wrapper for header: box.h
# Automatically generated using Clang.jl
function gal_box_bound_ellipse_extent(a, b, theta_deg, extent)
ccall((:gal_box_bound_ellipse_extent, libgnuastro), Cvoid, (Cdouble, Cdouble, Cdouble, Ptr{Cdouble}), a, b, theta_deg, extent)
end
function gal_box_bound_ellipse(a, b, theta_deg, width)
ccall((:gal_box_bound_ellipse, libgnuastro), Cvoid, (Cdouble, Cdouble, Cdouble, Ptr{Clong}), a, b, theta_deg, width)
end
function gal_box_bound_ellipsoid_extent(semiaxes, euler_deg, extent)
ccall((:gal_box_bound_ellipsoid_extent, libgnuastro), Cvoid, (Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}), semiaxes, euler_deg, extent)
end
function gal_box_bound_ellipsoid(semiaxes, euler_deg, width)
ccall((:gal_box_bound_ellipsoid, libgnuastro), Cvoid, (Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Clong}), semiaxes, euler_deg, width)
end
function gal_box_border_from_center(center, ndim, width, fpixel, lpixel)
ccall((:gal_box_border_from_center, libgnuastro), Cvoid, (Ptr{Cdouble}, Csize_t, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}), center, ndim, width, fpixel, lpixel)
end
function gal_box_overlap(naxes, fpixel_i, lpixel_i, fpixel_o, lpixel_o, ndim)
ccall((:gal_box_overlap, libgnuastro), Cint, (Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Ptr{Clong}, Csize_t), naxes, fpixel_i, lpixel_i, fpixel_o, lpixel_o, ndim)
end
# Julia wrapper for header: config.h
# Automatically generated using Clang.jl
# Julia wrapper for header: convolve.h
# Automatically generated using Clang.jl
function gal_convolve_spatial(tiles, kernel, numthreads, edgecorrection, convoverch)
ccall((:gal_convolve_spatial, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Csize_t, Cint, Cint), tiles, kernel, numthreads, edgecorrection, convoverch)
end
function gal_convolve_spatial_correct_ch_edge(tiles, kernel, numthreads, edgecorrection, tocorrect)
ccall((:gal_convolve_spatial_correct_ch_edge, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_data_t}, Csize_t, Cint, Ptr{gal_data_t}), tiles, kernel, numthreads, edgecorrection, tocorrect)
end
# Julia wrapper for header: cosmology.h
# Automatically generated using Clang.jl
function gal_cosmology_age(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_age, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_proper_distance(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_proper_distance, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_comoving_volume(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_comoving_volume, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_critical_density(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_critical_density, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_angular_distance(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_angular_distance, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_luminosity_distance(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_luminosity_distance, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_distance_modulus(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_distance_modulus, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
function gal_cosmology_to_absolute_mag(z, H0, o_lambda_0, o_matter_0, o_radiation_0)
ccall((:gal_cosmology_to_absolute_mag, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble, Cdouble), z, H0, o_lambda_0, o_matter_0, o_radiation_0)
end
# Julia wrapper for header: data.h
# Automatically generated using Clang.jl
function gal_data_alloc(array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
ccall((:gal_data_alloc, libgnuastro), Ptr{gal_data_t}, (Ptr{Cvoid}, UInt8, Csize_t, Ptr{Csize_t}, Ptr{wcsprm}, Cint, Csize_t, Cint, Cstring, Cstring, Cstring), array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
end
function gal_data_initialize(data, array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
ccall((:gal_data_initialize, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{Cvoid}, UInt8, Csize_t, Ptr{Csize_t}, Ptr{wcsprm}, Cint, Csize_t, Cint, Cstring, Cstring, Cstring), data, array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
end
function gal_data_free_contents(data)
ccall((:gal_data_free_contents, libgnuastro), Cvoid, (Ptr{gal_data_t},), data)
end
function gal_data_free(data)
ccall((:gal_data_free, libgnuastro), Cvoid, (Ptr{gal_data_t},), data)
end
function gal_data_array_calloc(size)
ccall((:gal_data_array_calloc, libgnuastro), Ptr{gal_data_t}, (Csize_t,), size)
end
function gal_data_array_free(dataarr, num, free_array)
ccall((:gal_data_array_free, libgnuastro), Cvoid, (Ptr{gal_data_t}, Csize_t, Cint), dataarr, num, free_array)
end
function gal_data_copy(in)
ccall((:gal_data_copy, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), in)
end
function gal_data_copy_to_new_type(in, newtype)
ccall((:gal_data_copy_to_new_type, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, UInt8), in, newtype)
end
function gal_data_copy_to_new_type_free(in, newtype)
ccall((:gal_data_copy_to_new_type_free, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, UInt8), in, newtype)
end
function gal_data_copy_to_allocated(in, out)
ccall((:gal_data_copy_to_allocated, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_data_t}), in, out)
end
function gal_data_copy_string_to_number(string)
ccall((:gal_data_copy_string_to_number, libgnuastro), Ptr{gal_data_t}, (Cstring,), string)
end
# Julia wrapper for header: dimension.h
# Automatically generated using Clang.jl
function gal_dimension_total_size(ndim, dsize)
ccall((:gal_dimension_total_size, libgnuastro), Csize_t, (Csize_t, Ptr{Csize_t}), ndim, dsize)
end
function gal_dimension_is_different(first, second)
ccall((:gal_dimension_is_different, libgnuastro), Cint, (Ptr{gal_data_t}, Ptr{gal_data_t}), first, second)
end
function gal_dimension_increment(ndim, dsize)
ccall((:gal_dimension_increment, libgnuastro), Ptr{Csize_t}, (Csize_t, Ptr{Csize_t}), ndim, dsize)
end
function gal_dimension_num_neighbors(ndim)
ccall((:gal_dimension_num_neighbors, libgnuastro), Csize_t, (Csize_t,), ndim)
end
function gal_dimension_add_coords(c1, c2, out, ndim)
ccall((:gal_dimension_add_coords, libgnuastro), Cvoid, (Ptr{Csize_t}, Ptr{Csize_t}, Ptr{Csize_t}, Csize_t), c1, c2, out, ndim)
end
function gal_dimension_coord_to_index(ndim, dsize, coord)
ccall((:gal_dimension_coord_to_index, libgnuastro), Csize_t, (Csize_t, Ptr{Csize_t}, Ptr{Csize_t}), ndim, dsize, coord)
end
function gal_dimension_index_to_coord(index, ndim, dsize, coord)
ccall((:gal_dimension_index_to_coord, libgnuastro), Cvoid, (Csize_t, Csize_t, Ptr{Csize_t}, Ptr{Csize_t}), index, ndim, dsize, coord)
end
function gal_dimension_dist_manhattan(a, b, ndim)
ccall((:gal_dimension_dist_manhattan, libgnuastro), Cfloat, (Ptr{Csize_t}, Ptr{Csize_t}, Csize_t), a, b, ndim)
end
function gal_dimension_dist_radial(a, b, ndim)
ccall((:gal_dimension_dist_radial, libgnuastro), Cfloat, (Ptr{Csize_t}, Ptr{Csize_t}, Csize_t), a, b, ndim)
end
function gal_dimension_collapse_sum(in, c_dim, weight)
ccall((:gal_dimension_collapse_sum, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Ptr{gal_data_t}), in, c_dim, weight)
end
function gal_dimension_collapse_mean(in, c_dim, weight)
ccall((:gal_dimension_collapse_mean, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Ptr{gal_data_t}), in, c_dim, weight)
end
function gal_dimension_collapse_number(in, c_dim)
ccall((:gal_dimension_collapse_number, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t), in, c_dim)
end
function gal_dimension_collapse_minmax(in, c_dim, max1_min0)
ccall((:gal_dimension_collapse_minmax, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cint), in, c_dim, max1_min0)
end
function gal_dimension_remove_extra(ndim, dsize, wcs)
ccall((:gal_dimension_remove_extra, libgnuastro), Csize_t, (Csize_t, Ptr{Csize_t}, Ptr{wcsprm}), ndim, dsize, wcs)
end
# Julia wrapper for header: eps.h
# Automatically generated using Clang.jl
function gal_eps_name_is_eps(name)
ccall((:gal_eps_name_is_eps, libgnuastro), Cint, (Cstring,), name)
end
function gal_eps_suffix_is_eps(name)
ccall((:gal_eps_suffix_is_eps, libgnuastro), Cint, (Cstring,), name)
end
function gal_eps_to_pt(widthincm, dsize, w_h_in_pt)
ccall((:gal_eps_to_pt, libgnuastro), Cvoid, (Cfloat, Ptr{Csize_t}, Ptr{Csize_t}), widthincm, dsize, w_h_in_pt)
end
function gal_eps_write(in, filename, widthincm, borderwidth, hex, dontoptimize, forpdf)
ccall((:gal_eps_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Cfloat, UInt32, Cint, Cint, Cint), in, filename, widthincm, borderwidth, hex, dontoptimize, forpdf)
end
# Julia wrapper for header: fits.h
# Automatically generated using Clang.jl
function gal_fits_io_error(status, message)
ccall((:gal_fits_io_error, libgnuastro), Cvoid, (Cint, Cstring), status, message)
end
function gal_fits_name_is_fits(name)
ccall((:gal_fits_name_is_fits, libgnuastro), Cint, (Cstring,), name)
end
function gal_fits_suffix_is_fits(suffix)
ccall((:gal_fits_suffix_is_fits, libgnuastro), Cint, (Cstring,), suffix)
end
function gal_fits_name_save_as_string(filename, hdu)
ccall((:gal_fits_name_save_as_string, libgnuastro), Cstring, (Cstring, Cstring), filename, hdu)
end
function gal_fits_bitpix_to_type(bitpix)
ccall((:gal_fits_bitpix_to_type, libgnuastro), UInt8, (Cint,), bitpix)
end
function gal_fits_type_to_bitpix(type)
ccall((:gal_fits_type_to_bitpix, libgnuastro), Cint, (UInt8,), type)
end
function gal_fits_type_to_bin_tform(type)
ccall((:gal_fits_type_to_bin_tform, libgnuastro), UInt8, (UInt8,), type)
end
function gal_fits_type_to_datatype(type)
ccall((:gal_fits_type_to_datatype, libgnuastro), Cint, (UInt8,), type)
end
function gal_fits_datatype_to_type(datatype, is_table_column)
ccall((:gal_fits_datatype_to_type, libgnuastro), UInt8, (Cint, Cint), datatype, is_table_column)
end
function gal_fits_open_to_write(filename)
ccall((:gal_fits_open_to_write, libgnuastro), Ptr{fitsfile}, (Cstring,), filename)
end
function gal_fits_hdu_num(filename)
ccall((:gal_fits_hdu_num, libgnuastro), Csize_t, (Cstring,), filename)
end
function gal_fits_hdu_format(filename, hdu)
ccall((:gal_fits_hdu_format, libgnuastro), Cint, (Cstring, Cstring), filename, hdu)
end
function gal_fits_hdu_open(filename, hdu, iomode)
ccall((:gal_fits_hdu_open, libgnuastro), Ptr{fitsfile}, (Cstring, Cstring, Cint), filename, hdu, iomode)
end
function gal_fits_hdu_open_format(filename, hdu, img0_tab1)
ccall((:gal_fits_hdu_open_format, libgnuastro), Ptr{fitsfile}, (Cstring, Cstring, Cint), filename, hdu, img0_tab1)
end
function gal_fits_key_img_blank(type)
ccall((:gal_fits_key_img_blank, libgnuastro), Ptr{Cvoid}, (UInt8,), type)
end
function gal_fits_key_clean_str_value(string)
ccall((:gal_fits_key_clean_str_value, libgnuastro), Cvoid, (Cstring,), string)
end
function gal_fits_key_date_to_struct_tm(fitsdate, tp)
ccall((:gal_fits_key_date_to_struct_tm, libgnuastro), Cstring, (Cstring, Ptr{Ctm}), fitsdate, tp)
end
function gal_fits_key_date_to_seconds(fitsdate, subsecstr, subsec)
ccall((:gal_fits_key_date_to_seconds, libgnuastro), Csize_t, (Cstring, Ptr{Cstring}, Ptr{Cdouble}), fitsdate, subsecstr, subsec)
end
function gal_fits_key_read_from_ptr(fptr, keysll, readcomment, readunit)
ccall((:gal_fits_key_read_from_ptr, libgnuastro), Cvoid, (Ptr{fitsfile}, Ptr{gal_data_t}, Cint, Cint), fptr, keysll, readcomment, readunit)
end
function gal_fits_key_read(filename, hdu, keysll, readcomment, readunit)
ccall((:gal_fits_key_read, libgnuastro), Cvoid, (Cstring, Cstring, Ptr{gal_data_t}, Cint, Cint), filename, hdu, keysll, readcomment, readunit)
end
function gal_fits_key_list_add(list, type, keyname, kfree, value, vfree, comment, cfree, unit)
ccall((:gal_fits_key_list_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, UInt8, Cstring, Cint, Ptr{Cvoid}, Cint, Cstring, Cint, Cstring), list, type, keyname, kfree, value, vfree, comment, cfree, unit)
end
function gal_fits_key_list_add_end(list, type, keyname, kfree, value, vfree, comment, cfree, unit)
ccall((:gal_fits_key_list_add_end, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, UInt8, Cstring, Cint, Ptr{Cvoid}, Cint, Cstring, Cint, Cstring), list, type, keyname, kfree, value, vfree, comment, cfree, unit)
end
function gal_fits_key_list_reverse(list)
ccall((:gal_fits_key_list_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}},), list)
end
function gal_fits_key_write_title_in_ptr(title, fptr)
ccall((:gal_fits_key_write_title_in_ptr, libgnuastro), Cvoid, (Cstring, Ptr{fitsfile}), title, fptr)
end
function gal_fits_key_write_filename(keynamebase, filename, list, top1end0)
ccall((:gal_fits_key_write_filename, libgnuastro), Cvoid, (Cstring, Cstring, Ptr{Ptr{gal_fits_list_key_t}}, Cint), keynamebase, filename, list, top1end0)
end
function gal_fits_key_write_wcsstr(fptr, wcsstr, nkeyrec)
ccall((:gal_fits_key_write_wcsstr, libgnuastro), Cvoid, (Ptr{fitsfile}, Cstring, Cint), fptr, wcsstr, nkeyrec)
end
function gal_fits_key_write(keylist, title, filename, hdu)
ccall((:gal_fits_key_write, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, Cstring, Cstring, Cstring), keylist, title, filename, hdu)
end
function gal_fits_key_write_in_ptr(keylist, fptr)
ccall((:gal_fits_key_write_in_ptr, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, Ptr{fitsfile}), keylist, fptr)
end
function gal_fits_key_write_version(keylist, title, filename, hdu)
ccall((:gal_fits_key_write_version, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, Cstring, Cstring, Cstring), keylist, title, filename, hdu)
end
function gal_fits_key_write_version_in_ptr(keylist, title, fptr)
ccall((:gal_fits_key_write_version_in_ptr, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, Cstring, Ptr{fitsfile}), keylist, title, fptr)
end
function gal_fits_key_write_config(keylist, title, extname, filename, hdu)
ccall((:gal_fits_key_write_config, libgnuastro), Cvoid, (Ptr{Ptr{gal_fits_list_key_t}}, Cstring, Cstring, Cstring, Cstring), keylist, title, extname, filename, hdu)
end
function gal_fits_img_info(fptr, type, ndim, dsize, name, unit)
ccall((:gal_fits_img_info, libgnuastro), Cvoid, (Ptr{fitsfile}, Ptr{Cint}, Ptr{Csize_t}, Ptr{Ptr{Csize_t}}, Ptr{Cstring}, Ptr{Cstring}), fptr, type, ndim, dsize, name, unit)
end
function gal_fits_img_info_dim(filename, hdu, ndim)
ccall((:gal_fits_img_info_dim, libgnuastro), Ptr{Csize_t}, (Cstring, Cstring, Ptr{Csize_t}), filename, hdu, ndim)
end
function gal_fits_img_read(filename, hdu, minmapsize, quietmmap)
ccall((:gal_fits_img_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Csize_t, Cint), filename, hdu, minmapsize, quietmmap)
end
function gal_fits_img_read_to_type(inputname, hdu, type, minmapsize, quietmmap)
ccall((:gal_fits_img_read_to_type, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, UInt8, Csize_t, Cint), inputname, hdu, type, minmapsize, quietmmap)
end
function gal_fits_img_read_kernel(filename, hdu, minmapsize, quietmmap)
ccall((:gal_fits_img_read_kernel, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Csize_t, Cint), filename, hdu, minmapsize, quietmmap)
end
function gal_fits_img_write_to_ptr(data, filename)
ccall((:gal_fits_img_write_to_ptr, libgnuastro), Ptr{fitsfile}, (Ptr{gal_data_t}, Cstring), data, filename)
end
function gal_fits_img_write(data, filename, headers, program_string)
ccall((:gal_fits_img_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Ptr{gal_fits_list_key_t}, Cstring), data, filename, headers, program_string)
end
function gal_fits_img_write_to_type(data, filename, headers, program_string, type)
ccall((:gal_fits_img_write_to_type, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Ptr{gal_fits_list_key_t}, Cstring, Cint), data, filename, headers, program_string, type)
end
function gal_fits_img_write_corr_wcs_str(input, filename, wcsheader, nkeyrec, crpix, headers, program_string)
ccall((:gal_fits_img_write_corr_wcs_str, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Cstring, Cint, Ptr{Cdouble}, Ptr{gal_fits_list_key_t}, Cstring), input, filename, wcsheader, nkeyrec, crpix, headers, program_string)
end
function gal_fits_tab_size(fitsptr, nrows, ncols)
ccall((:gal_fits_tab_size, libgnuastro), Cvoid, (Ptr{fitsfile}, Ptr{Csize_t}, Ptr{Csize_t}), fitsptr, nrows, ncols)
end
function gal_fits_tab_format(fptr)
ccall((:gal_fits_tab_format, libgnuastro), Cint, (Ptr{fitsfile},), fptr)
end
function gal_fits_tab_info(filename, hdu, numcols, numrows, tableformat)
ccall((:gal_fits_tab_info, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{Csize_t}, Ptr{Csize_t}, Ptr{Cint}), filename, hdu, numcols, numrows, tableformat)
end
function gal_fits_tab_read(filename, hdu, numrows, colinfo, indexll, minmapsize, quietmmap)
ccall((:gal_fits_tab_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Csize_t, Ptr{gal_data_t}, Ptr{gal_list_sizet_t}, Csize_t, Cint), filename, hdu, numrows, colinfo, indexll, minmapsize, quietmmap)
end
function gal_fits_tab_write(cols, comments, tableformat, filename, extname)
ccall((:gal_fits_tab_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_list_str_t}, Cint, Cstring, Cstring), cols, comments, tableformat, filename, extname)
end
# Julia wrapper for header: git.h
# Automatically generated using Clang.jl
function gal_git_describe()
ccall((:gal_git_describe, libgnuastro), Cstring, ())
end
# Julia wrapper for header: interpolate.h
# Automatically generated using Clang.jl
function gal_interpolate_close_neighbors(input, tl, metric, numneighbors, numthreads, onlyblank, aslinkedlist)
ccall((:gal_interpolate_close_neighbors, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}, UInt8, Csize_t, Csize_t, Cint, Cint), input, tl, metric, numneighbors, numthreads, onlyblank, aslinkedlist)
end
function gal_interpolate_1d_make_gsl_spline(X, Y, type_1d)
ccall((:gal_interpolate_1d_make_gsl_spline, libgnuastro), Ptr{gsl_spline}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint), X, Y, type_1d)
end
function gal_interpolate_1d_blank(in, type_1d)
ccall((:gal_interpolate_1d_blank, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cint), in, type_1d)
end
# Julia wrapper for header: jpeg.h
# Automatically generated using Clang.jl
function gal_jpeg_name_is_jpeg(name)
ccall((:gal_jpeg_name_is_jpeg, libgnuastro), Cint, (Cstring,), name)
end
function gal_jpeg_suffix_is_jpeg(name)
ccall((:gal_jpeg_suffix_is_jpeg, libgnuastro), Cint, (Cstring,), name)
end
function gal_jpeg_read(filename, minmapsize, quietmmap)
ccall((:gal_jpeg_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Csize_t, Cint), filename, minmapsize, quietmmap)
end
function gal_jpeg_write(in, filename, quality, widthincm)
ccall((:gal_jpeg_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, UInt8, Cfloat), in, filename, quality, widthincm)
end
# Julia wrapper for header: label.h
# Automatically generated using Clang.jl
function gal_label_indexs(labels, numlabs, minmapsize, quietmmap)
ccall((:gal_label_indexs, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Csize_t, Cint), labels, numlabs, minmapsize, quietmmap)
end
function gal_label_watershed(values, indexs, label, topinds, min0_max1)
ccall((:gal_label_watershed, libgnuastro), Csize_t, (Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{Csize_t}, Cint), values, indexs, label, topinds, min0_max1)
end
function gal_label_clump_significance(values, std, label, indexs, tl, numclumps, minarea, variance, keepsmall, sig, sigind)
ccall((:gal_label_clump_significance, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}, Csize_t, Csize_t, Cint, Cint, Ptr{gal_data_t}, Ptr{gal_data_t}), values, std, label, indexs, tl, numclumps, minarea, variance, keepsmall, sig, sigind)
end
function gal_label_grow_indexs(labels, indexs, withrivers, connectivity)
ccall((:gal_label_grow_indexs, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint, Cint), labels, indexs, withrivers, connectivity)
end
# Julia wrapper for header: list.h
# Automatically generated using Clang.jl
function gal_list_str_add(list, value, allocate)
ccall((:gal_list_str_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_str_t}}, Cstring, Cint), list, value, allocate)
end
function gal_list_str_pop(list)
ccall((:gal_list_str_pop, libgnuastro), Cstring, (Ptr{Ptr{gal_list_str_t}},), list)
end
function gal_list_str_number(list)
ccall((:gal_list_str_number, libgnuastro), Csize_t, (Ptr{gal_list_str_t},), list)
end
function gal_list_str_last(list)
ccall((:gal_list_str_last, libgnuastro), Ptr{gal_list_str_t}, (Ptr{gal_list_str_t},), list)
end
function gal_list_str_print(list)
ccall((:gal_list_str_print, libgnuastro), Cvoid, (Ptr{gal_list_str_t},), list)
end
function gal_list_str_reverse(list)
ccall((:gal_list_str_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_str_t}},), list)
end
function gal_list_str_free(list, freevalue)
ccall((:gal_list_str_free, libgnuastro), Cvoid, (Ptr{gal_list_str_t}, Cint), list, freevalue)
end
function gal_list_i32_add(list, value)
ccall((:gal_list_i32_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_i32_t}}, Int32), list, value)
end
function gal_list_i32_pop(list)
ccall((:gal_list_i32_pop, libgnuastro), Int32, (Ptr{Ptr{gal_list_i32_t}},), list)
end
function gal_list_i32_number(list)
ccall((:gal_list_i32_number, libgnuastro), Csize_t, (Ptr{gal_list_i32_t},), list)
end
function gal_list_i32_last(list)
ccall((:gal_list_i32_last, libgnuastro), Ptr{gal_list_i32_t}, (Ptr{gal_list_i32_t},), list)
end
function gal_list_i32_print(list)
ccall((:gal_list_i32_print, libgnuastro), Cvoid, (Ptr{gal_list_i32_t},), list)
end
function gal_list_i32_reverse(list)
ccall((:gal_list_i32_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_i32_t}},), list)
end
function gal_list_i32_to_array(list, reverse, num)
ccall((:gal_list_i32_to_array, libgnuastro), Ptr{Int32}, (Ptr{gal_list_i32_t}, Cint, Ptr{Csize_t}), list, reverse, num)
end
function gal_list_i32_free(list)
ccall((:gal_list_i32_free, libgnuastro), Cvoid, (Ptr{gal_list_i32_t},), list)
end
function gal_list_sizet_add(list, value)
ccall((:gal_list_sizet_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_sizet_t}}, Csize_t), list, value)
end
function gal_list_sizet_pop(list)
ccall((:gal_list_sizet_pop, libgnuastro), Csize_t, (Ptr{Ptr{gal_list_sizet_t}},), list)
end
function gal_list_sizet_number(list)
ccall((:gal_list_sizet_number, libgnuastro), Csize_t, (Ptr{gal_list_sizet_t},), list)
end
function gal_list_sizet_last(list)
ccall((:gal_list_sizet_last, libgnuastro), Ptr{gal_list_sizet_t}, (Ptr{gal_list_sizet_t},), list)
end
function gal_list_sizet_print(list)
ccall((:gal_list_sizet_print, libgnuastro), Cvoid, (Ptr{gal_list_sizet_t},), list)
end
function gal_list_sizet_reverse(list)
ccall((:gal_list_sizet_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_sizet_t}},), list)
end
function gal_list_sizet_to_array(list, reverse, num)
ccall((:gal_list_sizet_to_array, libgnuastro), Ptr{Csize_t}, (Ptr{gal_list_sizet_t}, Cint, Ptr{Csize_t}), list, reverse, num)
end
function gal_list_sizet_free(list)
ccall((:gal_list_sizet_free, libgnuastro), Cvoid, (Ptr{gal_list_sizet_t},), list)
end
function gal_list_f32_add(list, value)
ccall((:gal_list_f32_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_f32_t}}, Cfloat), list, value)
end
function gal_list_f32_pop(list)
ccall((:gal_list_f32_pop, libgnuastro), Cfloat, (Ptr{Ptr{gal_list_f32_t}},), list)
end
function gal_list_f32_number(list)
ccall((:gal_list_f32_number, libgnuastro), Csize_t, (Ptr{gal_list_f32_t},), list)
end
function gal_list_f32_last(list)
ccall((:gal_list_f32_last, libgnuastro), Ptr{gal_list_f32_t}, (Ptr{gal_list_f32_t},), list)
end
function gal_list_f32_reverse(list)
ccall((:gal_list_f32_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_f32_t}},), list)
end
function gal_list_f32_print(list)
ccall((:gal_list_f32_print, libgnuastro), Cvoid, (Ptr{gal_list_f32_t},), list)
end
function gal_list_f32_to_array(list, reverse, num)
ccall((:gal_list_f32_to_array, libgnuastro), Ptr{Cfloat}, (Ptr{gal_list_f32_t}, Cint, Ptr{Csize_t}), list, reverse, num)
end
function gal_list_f32_free(list)
ccall((:gal_list_f32_free, libgnuastro), Cvoid, (Ptr{gal_list_f32_t},), list)
end
function gal_list_f64_add(list, value)
ccall((:gal_list_f64_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_f64_t}}, Cdouble), list, value)
end
function gal_list_f64_pop(list)
ccall((:gal_list_f64_pop, libgnuastro), Cdouble, (Ptr{Ptr{gal_list_f64_t}},), list)
end
function gal_list_f64_number(list)
ccall((:gal_list_f64_number, libgnuastro), Csize_t, (Ptr{gal_list_f64_t},), list)
end
function gal_list_f64_last(list)
ccall((:gal_list_f64_last, libgnuastro), Ptr{gal_list_f64_t}, (Ptr{gal_list_f64_t},), list)
end
function gal_list_f64_print(list)
ccall((:gal_list_f64_print, libgnuastro), Cvoid, (Ptr{gal_list_f64_t},), list)
end
function gal_list_f64_reverse(list)
ccall((:gal_list_f64_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_f64_t}},), list)
end
function gal_list_f64_to_array(list, reverse, num)
ccall((:gal_list_f64_to_array, libgnuastro), Ptr{Cdouble}, (Ptr{gal_list_f64_t}, Cint, Ptr{Csize_t}), list, reverse, num)
end
function gal_list_f64_free(list)
ccall((:gal_list_f64_free, libgnuastro), Cvoid, (Ptr{gal_list_f64_t},), list)
end
function gal_list_void_add(list, value)
ccall((:gal_list_void_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_void_t}}, Ptr{Cvoid}), list, value)
end
function gal_list_void_pop(list)
ccall((:gal_list_void_pop, libgnuastro), Ptr{Cvoid}, (Ptr{Ptr{gal_list_void_t}},), list)
end
function gal_list_void_number(list)
ccall((:gal_list_void_number, libgnuastro), Csize_t, (Ptr{gal_list_void_t},), list)
end
function gal_list_void_last(list)
ccall((:gal_list_void_last, libgnuastro), Ptr{gal_list_void_t}, (Ptr{gal_list_void_t},), list)
end
function gal_list_void_reverse(list)
ccall((:gal_list_void_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_void_t}},), list)
end
function gal_list_void_free(list, freevalue)
ccall((:gal_list_void_free, libgnuastro), Cvoid, (Ptr{gal_list_void_t}, Cint), list, freevalue)
end
function gal_list_osizet_add(list, value, tosort)
ccall((:gal_list_osizet_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_osizet_t}}, Csize_t, Cfloat), list, value, tosort)
end
function gal_list_osizet_pop(list, sortvalue)
ccall((:gal_list_osizet_pop, libgnuastro), Csize_t, (Ptr{Ptr{gal_list_osizet_t}}, Ptr{Cfloat}), list, sortvalue)
end
function gal_list_osizet_to_sizet_free(in, out)
ccall((:gal_list_osizet_to_sizet_free, libgnuastro), Cvoid, (Ptr{gal_list_osizet_t}, Ptr{Ptr{gal_list_sizet_t}}), in, out)
end
function gal_list_dosizet_add(largest, smallest, value, tosort)
ccall((:gal_list_dosizet_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_dosizet_t}}, Ptr{Ptr{gal_list_dosizet_t}}, Csize_t, Cfloat), largest, smallest, value, tosort)
end
function gal_list_dosizet_pop_smallest(lartest, smallest, tosort)
ccall((:gal_list_dosizet_pop_smallest, libgnuastro), Csize_t, (Ptr{Ptr{gal_list_dosizet_t}}, Ptr{Ptr{gal_list_dosizet_t}}, Ptr{Cfloat}), lartest, smallest, tosort)
end
function gal_list_dosizet_print(largest, smallest)
ccall((:gal_list_dosizet_print, libgnuastro), Cvoid, (Ptr{gal_list_dosizet_t}, Ptr{gal_list_dosizet_t}), largest, smallest)
end
function gal_list_dosizet_to_sizet(in, out)
ccall((:gal_list_dosizet_to_sizet, libgnuastro), Cvoid, (Ptr{gal_list_dosizet_t}, Ptr{Ptr{gal_list_sizet_t}}), in, out)
end
function gal_list_dosizet_free(largest)
ccall((:gal_list_dosizet_free, libgnuastro), Cvoid, (Ptr{gal_list_dosizet_t},), largest)
end
function gal_list_data_add(list, newnode)
ccall((:gal_list_data_add, libgnuastro), Cvoid, (Ptr{Ptr{gal_data_t}}, Ptr{gal_data_t}), list, newnode)
end
function gal_list_data_add_alloc(list, array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
ccall((:gal_list_data_add_alloc, libgnuastro), Cvoid, (Ptr{Ptr{gal_data_t}}, Ptr{Cvoid}, UInt8, Csize_t, Ptr{Csize_t}, Ptr{wcsprm}, Cint, Csize_t, Cint, Cstring, Cstring, Cstring), list, array, type, ndim, dsize, wcs, clear, minmapsize, quietmmap, name, unit, comment)
end
function gal_list_data_pop(list)
ccall((:gal_list_data_pop, libgnuastro), Ptr{gal_data_t}, (Ptr{Ptr{gal_data_t}},), list)
end
function gal_list_data_reverse(list)
ccall((:gal_list_data_reverse, libgnuastro), Cvoid, (Ptr{Ptr{gal_data_t}},), list)
end
function gal_list_data_to_array_ptr(list, num)
ccall((:gal_list_data_to_array_ptr, libgnuastro), Ptr{Ptr{gal_data_t}}, (Ptr{gal_data_t}, Ptr{Csize_t}), list, num)
end
function gal_list_data_number(list)
ccall((:gal_list_data_number, libgnuastro), Csize_t, (Ptr{gal_data_t},), list)
end
function gal_list_data_last(list)
ccall((:gal_list_data_last, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), list)
end
function gal_list_data_free(list)
ccall((:gal_list_data_free, libgnuastro), Cvoid, (Ptr{gal_data_t},), list)
end
# Julia wrapper for header: match.h
# Automatically generated using Clang.jl
function gal_match_coordinates(coord1, coord2, aperture, sorted_by_first, inplace, minmapsize, quietmmap, nummatched)
ccall((:gal_match_coordinates, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{Cdouble}, Cint, Cint, Csize_t, Cint, Ptr{Csize_t}), coord1, coord2, aperture, sorted_by_first, inplace, minmapsize, quietmmap, nummatched)
end
# Julia wrapper for header: pdf.h
# Automatically generated using Clang.jl
function gal_pdf_name_is_pdf(name)
ccall((:gal_pdf_name_is_pdf, libgnuastro), Cint, (Cstring,), name)
end
function gal_pdf_suffix_is_pdf(name)
ccall((:gal_pdf_suffix_is_pdf, libgnuastro), Cint, (Cstring,), name)
end
function gal_pdf_write(in, filename, widthincm, borderwidth, dontoptimize)
ccall((:gal_pdf_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Cfloat, UInt32, Cint), in, filename, widthincm, borderwidth, dontoptimize)
end
# Julia wrapper for header: permutation.h
# Automatically generated using Clang.jl
function gal_permutation_check(permutation, size)
ccall((:gal_permutation_check, libgnuastro), Cvoid, (Ptr{Csize_t}, Csize_t), permutation, size)
end
function gal_permutation_apply(input, permutation)
ccall((:gal_permutation_apply, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{Csize_t}), input, permutation)
end
function gal_permutation_apply_inverse(input, permutation)
ccall((:gal_permutation_apply_inverse, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{Csize_t}), input, permutation)
end
# Julia wrapper for header: pointer.h
# Automatically generated using Clang.jl
function gal_pointer_increment(pointer, increment, type)
ccall((:gal_pointer_increment, libgnuastro), Ptr{Cvoid}, (Ptr{Cvoid}, Csize_t, UInt8), pointer, increment, type)
end
function gal_pointer_num_between(earlier, later, type)
ccall((:gal_pointer_num_between, libgnuastro), Csize_t, (Ptr{Cvoid}, Ptr{Cvoid}, UInt8), earlier, later, type)
end
function gal_pointer_allocate(type, size, clear, funcname, varname)
ccall((:gal_pointer_allocate, libgnuastro), Ptr{Cvoid}, (UInt8, Csize_t, Cint, Cstring, Cstring), type, size, clear, funcname, varname)
end
function gal_pointer_allocate_mmap(type, size, clear, filename, quiet)
ccall((:gal_pointer_allocate_mmap, libgnuastro), Ptr{Cvoid}, (UInt8, Csize_t, Cint, Ptr{Cstring}, Cint), type, size, clear, filename, quiet)
end
# Julia wrapper for header: polygon.h
# Automatically generated using Clang.jl
function gal_polygon_ordered_corners(in, n, ordinds)
ccall((:gal_polygon_ordered_corners, libgnuastro), Cvoid, (Ptr{Cdouble}, Csize_t, Ptr{Csize_t}), in, n, ordinds)
end
function gal_polygon_area(v, n)
ccall((:gal_polygon_area, libgnuastro), Cdouble, (Ptr{Cdouble}, Csize_t), v, n)
end
function gal_polygon_pin(v, p, n)
ccall((:gal_polygon_pin, libgnuastro), Cint, (Ptr{Cdouble}, Ptr{Cdouble}, Csize_t), v, p, n)
end
function gal_polygon_ppropin(v, p, n)
ccall((:gal_polygon_ppropin, libgnuastro), Cint, (Ptr{Cdouble}, Ptr{Cdouble}, Csize_t), v, p, n)
end
function gal_polygon_clip(s, n, c, m, o, numcrn)
ccall((:gal_polygon_clip, libgnuastro), Cvoid, (Ptr{Cdouble}, Csize_t, Ptr{Cdouble}, Csize_t, Ptr{Cdouble}, Ptr{Csize_t}), s, n, c, m, o, numcrn)
end
# Julia wrapper for header: qsort.h
# Automatically generated using Clang.jl
function gal_qsort_uint8_d(a, b)
ccall((:gal_qsort_uint8_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint8_i(a, b)
ccall((:gal_qsort_uint8_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int8_d(a, b)
ccall((:gal_qsort_int8_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int8_i(a, b)
ccall((:gal_qsort_int8_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint16_d(a, b)
ccall((:gal_qsort_uint16_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint16_i(a, b)
ccall((:gal_qsort_uint16_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int16_d(a, b)
ccall((:gal_qsort_int16_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int16_i(a, b)
ccall((:gal_qsort_int16_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint32_d(a, b)
ccall((:gal_qsort_uint32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint32_i(a, b)
ccall((:gal_qsort_uint32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int32_d(a, b)
ccall((:gal_qsort_int32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int32_i(a, b)
ccall((:gal_qsort_int32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint64_d(a, b)
ccall((:gal_qsort_uint64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_uint64_i(a, b)
ccall((:gal_qsort_uint64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int64_d(a, b)
ccall((:gal_qsort_int64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_int64_i(a, b)
ccall((:gal_qsort_int64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_float32_d(a, b)
ccall((:gal_qsort_float32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_float32_i(a, b)
ccall((:gal_qsort_float32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_float64_d(a, b)
ccall((:gal_qsort_float64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_float64_i(a, b)
ccall((:gal_qsort_float64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint8_d(a, b)
ccall((:gal_qsort_index_single_uint8_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint8_i(a, b)
ccall((:gal_qsort_index_single_uint8_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int8_d(a, b)
ccall((:gal_qsort_index_single_int8_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int8_i(a, b)
ccall((:gal_qsort_index_single_int8_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint16_d(a, b)
ccall((:gal_qsort_index_single_uint16_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint16_i(a, b)
ccall((:gal_qsort_index_single_uint16_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int16_d(a, b)
ccall((:gal_qsort_index_single_int16_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int16_i(a, b)
ccall((:gal_qsort_index_single_int16_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint32_d(a, b)
ccall((:gal_qsort_index_single_uint32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint32_i(a, b)
ccall((:gal_qsort_index_single_uint32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int32_d(a, b)
ccall((:gal_qsort_index_single_int32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int32_i(a, b)
ccall((:gal_qsort_index_single_int32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint64_d(a, b)
ccall((:gal_qsort_index_single_uint64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_uint64_i(a, b)
ccall((:gal_qsort_index_single_uint64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int64_d(a, b)
ccall((:gal_qsort_index_single_int64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_int64_i(a, b)
ccall((:gal_qsort_index_single_int64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_float32_d(a, b)
ccall((:gal_qsort_index_single_float32_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_float32_i(a, b)
ccall((:gal_qsort_index_single_float32_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_float64_d(a, b)
ccall((:gal_qsort_index_single_float64_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_single_float64_i(a, b)
ccall((:gal_qsort_index_single_float64_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_multi_d(a, b)
ccall((:gal_qsort_index_multi_d, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
function gal_qsort_index_multi_i(a, b)
ccall((:gal_qsort_index_multi_i, libgnuastro), Cint, (Ptr{Cvoid}, Ptr{Cvoid}), a, b)
end
# Julia wrapper for header: speclines.h
# Automatically generated using Clang.jl
function gal_speclines_line_name(linecode)
ccall((:gal_speclines_line_name, libgnuastro), Cstring, (Cint,), linecode)
end
function gal_speclines_line_code(name)
ccall((:gal_speclines_line_code, libgnuastro), Cint, (Cstring,), name)
end
function gal_speclines_line_angstrom(linecode)
ccall((:gal_speclines_line_angstrom, libgnuastro), Cdouble, (Cint,), linecode)
end
function gal_speclines_line_redshift(obsline, restline)
ccall((:gal_speclines_line_redshift, libgnuastro), Cdouble, (Cdouble, Cdouble), obsline, restline)
end
function gal_speclines_line_redshift_code(obsline, linecode)
ccall((:gal_speclines_line_redshift_code, libgnuastro), Cdouble, (Cdouble, Cint), obsline, linecode)
end
# Julia wrapper for header: statistics.h
# Automatically generated using Clang.jl
function gal_statistics_number(input)
ccall((:gal_statistics_number, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_minimum(input)
ccall((:gal_statistics_minimum, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_maximum(input)
ccall((:gal_statistics_maximum, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_sum(input)
ccall((:gal_statistics_sum, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_mean(input)
ccall((:gal_statistics_mean, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_std(input)
ccall((:gal_statistics_std, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_mean_std(input)
ccall((:gal_statistics_mean_std, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), input)
end
function gal_statistics_median(input, inplace)
ccall((:gal_statistics_median, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cint), input, inplace)
end
function gal_statistics_quantile_index(size, quantile)
ccall((:gal_statistics_quantile_index, libgnuastro), Csize_t, (Csize_t, Cdouble), size, quantile)
end
function gal_statistics_quantile(input, quantile, inplace)
ccall((:gal_statistics_quantile, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cdouble, Cint), input, quantile, inplace)
end
function gal_statistics_quantile_function_index(input, value, inplace)
ccall((:gal_statistics_quantile_function_index, libgnuastro), Csize_t, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint), input, value, inplace)
end
function gal_statistics_quantile_function(input, value, inplace)
ccall((:gal_statistics_quantile_function, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint), input, value, inplace)
end
function gal_statistics_unique(input, inplace)
ccall((:gal_statistics_unique, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cint), input, inplace)
end
function gal_statistics_mode(input, errorstd, inplace)
ccall((:gal_statistics_mode, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cfloat, Cint), input, errorstd, inplace)
end
function gal_statistics_mode_mirror_plots(input, value, numbins, inplace, mirror_val)
ccall((:gal_statistics_mode_mirror_plots, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Csize_t, Cint, Ptr{Cdouble}), input, value, numbins, inplace, mirror_val)
end
function gal_statistics_is_sorted(input, updateflags)
ccall((:gal_statistics_is_sorted, libgnuastro), Cint, (Ptr{gal_data_t}, Cint), input, updateflags)
end
function gal_statistics_sort_increasing(input)
ccall((:gal_statistics_sort_increasing, libgnuastro), Cvoid, (Ptr{gal_data_t},), input)
end
function gal_statistics_sort_decreasing(input)
ccall((:gal_statistics_sort_decreasing, libgnuastro), Cvoid, (Ptr{gal_data_t},), input)
end
function gal_statistics_no_blank_sorted(input, inplace)
ccall((:gal_statistics_no_blank_sorted, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cint), input, inplace)
end
function gal_statistics_regular_bins(data, range, numbins, onebinstart)
ccall((:gal_statistics_regular_bins, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Csize_t, Cdouble), data, range, numbins, onebinstart)
end
function gal_statistics_histogram(data, bins, normalize, maxhistone)
ccall((:gal_statistics_histogram, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint, Cint), data, bins, normalize, maxhistone)
end
function gal_statistics_cfp(data, bins, normalize)
ccall((:gal_statistics_cfp, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint), data, bins, normalize)
end
function gal_statistics_sigma_clip(input, multip, param, inplace, quiet)
ccall((:gal_statistics_sigma_clip, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Cfloat, Cfloat, Cint, Cint), input, multip, param, inplace, quiet)
end
function gal_statistics_outlier_positive(input, window_size, sigma, sigclip_multip, sigclip_param, inplace, quiet)
ccall((:gal_statistics_outlier_positive, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cfloat, Cfloat, Cfloat, Cint, Cint), input, window_size, sigma, sigclip_multip, sigclip_param, inplace, quiet)
end
function gal_statistics_outlier_flat_cfp(input, numprev, sigclip_multip, sigclip_param, thresh, numcontig, inplace, quiet, index)
ccall((:gal_statistics_outlier_flat_cfp, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Csize_t, Cfloat, Cfloat, Cfloat, Csize_t, Cint, Cint, Ptr{Csize_t}), input, numprev, sigclip_multip, sigclip_param, thresh, numcontig, inplace, quiet, index)
end
# Julia wrapper for header: table.h
# Automatically generated using Clang.jl
function gal_table_info(filename, hdu, lines, numcols, numrows, tableformat)
ccall((:gal_table_info, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, Ptr{Csize_t}, Ptr{Csize_t}, Ptr{Cint}), filename, hdu, lines, numcols, numrows, tableformat)
end
function gal_table_print_info(allcols, numcols, numrows)
ccall((:gal_table_print_info, libgnuastro), Cvoid, (Ptr{gal_data_t}, Csize_t, Csize_t), allcols, numcols, numrows)
end
function gal_table_read(filename, hdu, lines, cols, searchin, ignorecase, minmapsize, quietmmap, colmatch)
ccall((:gal_table_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Cstring, Ptr{gal_list_str_t}, Ptr{gal_list_str_t}, Cint, Cint, Csize_t, Cint, Ptr{Csize_t}), filename, hdu, lines, cols, searchin, ignorecase, minmapsize, quietmmap, colmatch)
end
function gal_table_list_of_indexs(cols, allcols, numcols, searchin, ignorecase, filename, hdu, colmatch)
ccall((:gal_table_list_of_indexs, libgnuastro), Ptr{gal_list_sizet_t}, (Ptr{gal_list_str_t}, Ptr{gal_data_t}, Csize_t, Cint, Cint, Cstring, Cstring, Ptr{Csize_t}), cols, allcols, numcols, searchin, ignorecase, filename, hdu, colmatch)
end
function gal_table_comments_add_intro(comments, program_string, rawtime)
ccall((:gal_table_comments_add_intro, libgnuastro), Cvoid, (Ptr{Ptr{gal_list_str_t}}, Cstring, Ptr{Ctime_t}), comments, program_string, rawtime)
end
function gal_table_write(cols, comments, tableformat, filename, extname, colinfoinstdout)
ccall((:gal_table_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_list_str_t}, Cint, Cstring, Cstring, UInt8), cols, comments, tableformat, filename, extname, colinfoinstdout)
end
function gal_table_write_log(logll, program_string, rawtime, comments, filename, quiet)
ccall((:gal_table_write_log, libgnuastro), Cvoid, (Ptr{gal_data_t}, Cstring, Ptr{Ctime_t}, Ptr{gal_list_str_t}, Cstring, Cint), logll, program_string, rawtime, comments, filename, quiet)
end
# Julia wrapper for header: threads.h
# Automatically generated using Clang.jl
function pthread_barrier_init(b, attr, limit)
ccall((:pthread_barrier_init, libgnuastro), Cint, (Ptr{pthread_barrier_t}, Ptr{pthread_barrierattr_t}, UInt32), b, attr, limit)
end
function pthread_barrier_wait(b)
ccall((:pthread_barrier_wait, libgnuastro), Cint, (Ptr{pthread_barrier_t},), b)
end
function pthread_barrier_destroy(b)
ccall((:pthread_barrier_destroy, libgnuastro), Cint, (Ptr{pthread_barrier_t},), b)
end
function gal_threads_number()
ccall((:gal_threads_number, libgnuastro), Csize_t, ())
end
function gal_threads_dist_in_threads(numactions, numthreads, outthrds, outthrdcols)
ccall((:gal_threads_dist_in_threads, libgnuastro), Cvoid, (Csize_t, Csize_t, Ptr{Ptr{Csize_t}}, Ptr{Csize_t}), numactions, numthreads, outthrds, outthrdcols)
end
function gal_threads_attr_barrier_init(attr, b, limit)
ccall((:gal_threads_attr_barrier_init, libgnuastro), Cvoid, (Ptr{pthread_attr_t}, Ptr{pthread_barrier_t}, Csize_t), attr, b, limit)
end
function gal_threads_spin_off(worker, caller_params, numactions, numthreads)
ccall((:gal_threads_spin_off, libgnuastro), Cvoid, (Ptr{Cvoid}, Ptr{Cvoid}, Csize_t, Csize_t), worker, caller_params, numactions, numthreads)
end
# Julia wrapper for header: tiff.h
# Automatically generated using Clang.jl
function gal_tiff_name_is_tiff(name)
ccall((:gal_tiff_name_is_tiff, libgnuastro), Cint, (Cstring,), name)
end
function gal_tiff_suffix_is_tiff(name)
ccall((:gal_tiff_suffix_is_tiff, libgnuastro), Cint, (Cstring,), name)
end
function gal_tiff_dir_string_read(string)
ccall((:gal_tiff_dir_string_read, libgnuastro), Csize_t, (Cstring,), string)
end
function gal_tiff_read(filename, dir, minmapsize, quietmmap)
ccall((:gal_tiff_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Csize_t, Csize_t, Cint), filename, dir, minmapsize, quietmmap)
end
# Julia wrapper for header: tile.h
# Automatically generated using Clang.jl
function gal_tile_start_coord(tile, start_coord)
ccall((:gal_tile_start_coord, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{Csize_t}), tile, start_coord)
end
function gal_tile_start_end_coord(tile, start_end, rel_block)
ccall((:gal_tile_start_end_coord, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{Csize_t}, Cint), tile, start_end, rel_block)
end
function gal_tile_start_end_ind_inclusive(tile, work, start_end_inc)
ccall((:gal_tile_start_end_ind_inclusive, libgnuastro), Ptr{Cvoid}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Ptr{Csize_t}), tile, work, start_end_inc)
end
function gal_tile_series_from_minmax(block, minmax, number)
ccall((:gal_tile_series_from_minmax, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{Csize_t}, Csize_t), block, minmax, number)
end
function gal_tile_block(tile)
ccall((:gal_tile_block, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), tile)
end
function gal_tile_block_increment(block, tsize, num_increment, coord)
ccall((:gal_tile_block_increment, libgnuastro), Csize_t, (Ptr{gal_data_t}, Ptr{Csize_t}, Csize_t, Ptr{Csize_t}), block, tsize, num_increment, coord)
end
function gal_tile_block_write_const_value(tilevalues, tilesll, withblank, initialize)
ccall((:gal_tile_block_write_const_value, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_data_t}, Cint, Cint), tilevalues, tilesll, withblank, initialize)
end
function gal_tile_block_check_tiles(tiles)
ccall((:gal_tile_block_check_tiles, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t},), tiles)
end
function gal_tile_block_relative_to_other(tile, other)
ccall((:gal_tile_block_relative_to_other, libgnuastro), Ptr{Cvoid}, (Ptr{gal_data_t}, Ptr{gal_data_t}), tile, other)
end
function gal_tile_block_blank_flag(tile_ll, numthreads)
ccall((:gal_tile_block_blank_flag, libgnuastro), Cvoid, (Ptr{gal_data_t}, Csize_t), tile_ll, numthreads)
end
function gal_tile_full(input, regular, remainderfrac, out, multiple, firsttsize)
ccall((:gal_tile_full, libgnuastro), Ptr{Csize_t}, (Ptr{gal_data_t}, Ptr{Csize_t}, Cfloat, Ptr{Ptr{gal_data_t}}, Csize_t, Ptr{Ptr{Csize_t}}), input, regular, remainderfrac, out, multiple, firsttsize)
end
function gal_tile_full_sanity_check(filename, hdu, input, tl)
ccall((:gal_tile_full_sanity_check, libgnuastro), Cvoid, (Cstring, Cstring, Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}), filename, hdu, input, tl)
end
function gal_tile_full_two_layers(input, tl)
ccall((:gal_tile_full_two_layers, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}), input, tl)
end
function gal_tile_full_permutation(tl)
ccall((:gal_tile_full_permutation, libgnuastro), Cvoid, (Ptr{gal_tile_two_layer_params},), tl)
end
function gal_tile_full_values_write(tilevalues, tl, withblank, filename, keys, program_string)
ccall((:gal_tile_full_values_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}, Cint, Cstring, Ptr{gal_fits_list_key_t}, Cstring), tilevalues, tl, withblank, filename, keys, program_string)
end
function gal_tile_full_values_smooth(tilevalues, tl, width, numthreads)
ccall((:gal_tile_full_values_smooth, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{gal_tile_two_layer_params}, Csize_t, Csize_t), tilevalues, tl, width, numthreads)
end
function gal_tile_full_id_from_coord(tl, coord)
ccall((:gal_tile_full_id_from_coord, libgnuastro), Csize_t, (Ptr{gal_tile_two_layer_params}, Ptr{Csize_t}), tl, coord)
end
function gal_tile_full_blank_flag(tile_ll, numthreads)
ccall((:gal_tile_full_blank_flag, libgnuastro), Cvoid, (Ptr{gal_data_t}, Csize_t), tile_ll, numthreads)
end
function gal_tile_full_free_contents(tl)
ccall((:gal_tile_full_free_contents, libgnuastro), Cvoid, (Ptr{gal_tile_two_layer_params},), tl)
end
# Julia wrapper for header: txt.h
# Automatically generated using Clang.jl
function gal_txt_line_stat(line)
ccall((:gal_txt_line_stat, libgnuastro), Cint, (Cstring,), line)
end
function gal_txt_table_info(filename, lines, numcols, numrows)
ccall((:gal_txt_table_info, libgnuastro), Ptr{gal_data_t}, (Cstring, Ptr{gal_list_str_t}, Ptr{Csize_t}, Ptr{Csize_t}), filename, lines, numcols, numrows)
end
function gal_txt_image_info(filename, lines, numimg, dsize)
ccall((:gal_txt_image_info, libgnuastro), Ptr{gal_data_t}, (Cstring, Ptr{gal_list_str_t}, Ptr{Csize_t}, Ptr{Csize_t}), filename, lines, numimg, dsize)
end
function gal_txt_table_read(filename, lines, numrows, colinfo, indexll, minmapsize, quietmmap)
ccall((:gal_txt_table_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Ptr{gal_list_str_t}, Csize_t, Ptr{gal_data_t}, Ptr{gal_list_sizet_t}, Csize_t, Cint), filename, lines, numrows, colinfo, indexll, minmapsize, quietmmap)
end
function gal_txt_image_read(filename, lines, minmapsize, quietmmap)
ccall((:gal_txt_image_read, libgnuastro), Ptr{gal_data_t}, (Cstring, Ptr{gal_list_str_t}, Csize_t, Cint), filename, lines, minmapsize, quietmmap)
end
function gal_txt_stdin_read(timeout_microsec)
ccall((:gal_txt_stdin_read, libgnuastro), Ptr{gal_list_str_t}, (Clong,), timeout_microsec)
end
function gal_txt_write(input, comment, filename, colinfoinstdout)
ccall((:gal_txt_write, libgnuastro), Cvoid, (Ptr{gal_data_t}, Ptr{gal_list_str_t}, Cstring, UInt8), input, comment, filename, colinfoinstdout)
end
# Julia wrapper for header: type.h
# Automatically generated using Clang.jl
function gal_type_sizeof(type)
ccall((:gal_type_sizeof, libgnuastro), Csize_t, (UInt8,), type)
end
function gal_type_name(type, long_name)
ccall((:gal_type_name, libgnuastro), Cstring, (UInt8, Cint), type, long_name)
end
function gal_type_from_name(str)
ccall((:gal_type_from_name, libgnuastro), UInt8, (Cstring,), str)
end
function gal_type_min(type, in)
ccall((:gal_type_min, libgnuastro), Cvoid, (UInt8, Ptr{Cvoid}), type, in)
end
function gal_type_max(type, in)
ccall((:gal_type_max, libgnuastro), Cvoid, (UInt8, Ptr{Cvoid}), type, in)
end
function gal_type_is_int(type)
ccall((:gal_type_is_int, libgnuastro), Cint, (UInt8,), type)
end
function gal_type_is_list(type)
ccall((:gal_type_is_list, libgnuastro), Cint, (UInt8,), type)
end
function gal_type_out(first_type, second_type)
ccall((:gal_type_out, libgnuastro), Cint, (Cint, Cint), first_type, second_type)
end
function gal_type_bit_string(in, size)
ccall((:gal_type_bit_string, libgnuastro), Cstring, (Ptr{Cvoid}, Csize_t), in, size)
end
function gal_type_to_string(ptr, type, quote_if_str_has_space)
ccall((:gal_type_to_string, libgnuastro), Cstring, (Ptr{Cvoid}, UInt8, Cint), ptr, type, quote_if_str_has_space)
end
function gal_type_from_string(out, string, type)
ccall((:gal_type_from_string, libgnuastro), Cint, (Ptr{Ptr{Cvoid}}, Cstring, UInt8), out, string, type)
end
function gal_type_string_to_number(string, type)
ccall((:gal_type_string_to_number, libgnuastro), Ptr{Cvoid}, (Cstring, Ptr{UInt8}), string, type)
end
# Julia wrapper for header: wcs.h
# Automatically generated using Clang.jl
function gal_wcs_read_fitsptr(fptr, hstartwcs, hendwcs, nwcs)
ccall((:gal_wcs_read_fitsptr, libgnuastro), Ptr{wcsprm}, (Ptr{fitsfile}, Csize_t, Csize_t, Ptr{Cint}), fptr, hstartwcs, hendwcs, nwcs)
end
function gal_wcs_read(filename, hdu, hstartwcs, hendwcs, nwcs)
ccall((:gal_wcs_read, libgnuastro), Ptr{wcsprm}, (Cstring, Cstring, Csize_t, Csize_t, Ptr{Cint}), filename, hdu, hstartwcs, hendwcs, nwcs)
end
function gal_wcs_copy(wcs)
ccall((:gal_wcs_copy, libgnuastro), Ptr{wcsprm}, (Ptr{wcsprm},), wcs)
end
function gal_wcs_remove_dimension(wcs, fitsdim)
ccall((:gal_wcs_remove_dimension, libgnuastro), Cvoid, (Ptr{wcsprm}, Csize_t), wcs, fitsdim)
end
function gal_wcs_on_tile(tile)
ccall((:gal_wcs_on_tile, libgnuastro), Cvoid, (Ptr{gal_data_t},), tile)
end
function gal_wcs_warp_matrix(wcs)
ccall((:gal_wcs_warp_matrix, libgnuastro), Ptr{Cdouble}, (Ptr{wcsprm},), wcs)
end
function gal_wcs_decompose_pc_cdelt(wcs)
ccall((:gal_wcs_decompose_pc_cdelt, libgnuastro), Cvoid, (Ptr{wcsprm},), wcs)
end
function gal_wcs_angular_distance_deg(r1, d1, r2, d2)
ccall((:gal_wcs_angular_distance_deg, libgnuastro), Cdouble, (Cdouble, Cdouble, Cdouble, Cdouble), r1, d1, r2, d2)
end
function gal_wcs_pixel_scale(wcs)
ccall((:gal_wcs_pixel_scale, libgnuastro), Ptr{Cdouble}, (Ptr{wcsprm},), wcs)
end
function gal_wcs_pixel_area_arcsec2(wcs)
ccall((:gal_wcs_pixel_area_arcsec2, libgnuastro), Cdouble, (Ptr{wcsprm},), wcs)
end
function gal_wcs_world_to_img(coords, wcs, inplace)
ccall((:gal_wcs_world_to_img, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{wcsprm}, Cint), coords, wcs, inplace)
end
function gal_wcs_img_to_world(coords, wcs, inplace)
ccall((:gal_wcs_img_to_world, libgnuastro), Ptr{gal_data_t}, (Ptr{gal_data_t}, Ptr{wcsprm}, Cint), coords, wcs, inplace)
end
# Automatically generated using Clang.jl
# it's fine to just define these types to be Cvoid since the API only pass them around as Ptr{Cvoid}.
const wcsprm = Cvoid
const fitsfile = Cvoid
const gsl_spline = Cvoid
const pthread_attr_t = Cvoid
const GAL_ARITHMETIC_INPLACE = 0x01
const GAL_ARITHMETIC_FREE = 0x02
const GAL_ARITHMETIC_NUMOK = 0x04
const GAL_ARITHMETIC_FLAGS_ALL = (GAL_ARITHMETIC_INPLACE | GAL_ARITHMETIC_FREE) | GAL_ARITHMETIC_NUMOK
@cenum gal_arithmetic_operators::UInt32 begin
GAL_ARITHMETIC_OP_INVALID = 0
GAL_ARITHMETIC_OP_PLUS = 1
GAL_ARITHMETIC_OP_MINUS = 2
GAL_ARITHMETIC_OP_MULTIPLY = 3
GAL_ARITHMETIC_OP_DIVIDE = 4
GAL_ARITHMETIC_OP_MODULO = 5
GAL_ARITHMETIC_OP_LT = 6
GAL_ARITHMETIC_OP_LE = 7
GAL_ARITHMETIC_OP_GT = 8
GAL_ARITHMETIC_OP_GE = 9
GAL_ARITHMETIC_OP_EQ = 10
GAL_ARITHMETIC_OP_NE = 11
GAL_ARITHMETIC_OP_AND = 12
GAL_ARITHMETIC_OP_OR = 13
GAL_ARITHMETIC_OP_NOT = 14
GAL_ARITHMETIC_OP_ISBLANK = 15
GAL_ARITHMETIC_OP_WHERE = 16
GAL_ARITHMETIC_OP_BITAND = 17
GAL_ARITHMETIC_OP_BITOR = 18
GAL_ARITHMETIC_OP_BITXOR = 19
GAL_ARITHMETIC_OP_BITLSH = 20
GAL_ARITHMETIC_OP_BITRSH = 21
GAL_ARITHMETIC_OP_BITNOT = 22
GAL_ARITHMETIC_OP_ABS = 23
GAL_ARITHMETIC_OP_POW = 24
GAL_ARITHMETIC_OP_SQRT = 25
GAL_ARITHMETIC_OP_LOG = 26
GAL_ARITHMETIC_OP_LOG10 = 27
GAL_ARITHMETIC_OP_MINVAL = 28
GAL_ARITHMETIC_OP_MAXVAL = 29
GAL_ARITHMETIC_OP_NUMBERVAL = 30
GAL_ARITHMETIC_OP_SUMVAL = 31
GAL_ARITHMETIC_OP_MEANVAL = 32
GAL_ARITHMETIC_OP_STDVAL = 33
GAL_ARITHMETIC_OP_MEDIANVAL = 34
GAL_ARITHMETIC_OP_MIN = 35
GAL_ARITHMETIC_OP_MAX = 36
GAL_ARITHMETIC_OP_NUMBER = 37
GAL_ARITHMETIC_OP_SUM = 38
GAL_ARITHMETIC_OP_MEAN = 39
GAL_ARITHMETIC_OP_STD = 40
GAL_ARITHMETIC_OP_MEDIAN = 41
GAL_ARITHMETIC_OP_SIGCLIP_NUMBER = 42
GAL_ARITHMETIC_OP_SIGCLIP_MEAN = 43
GAL_ARITHMETIC_OP_SIGCLIP_MEDIAN = 44
GAL_ARITHMETIC_OP_SIGCLIP_STD = 45
GAL_ARITHMETIC_OP_TO_UINT8 = 46
GAL_ARITHMETIC_OP_TO_INT8 = 47
GAL_ARITHMETIC_OP_TO_UINT16 = 48
GAL_ARITHMETIC_OP_TO_INT16 = 49
GAL_ARITHMETIC_OP_TO_UINT32 = 50
GAL_ARITHMETIC_OP_TO_INT32 = 51
GAL_ARITHMETIC_OP_TO_UINT64 = 52
GAL_ARITHMETIC_OP_TO_INT64 = 53
GAL_ARITHMETIC_OP_TO_FLOAT32 = 54
GAL_ARITHMETIC_OP_TO_FLOAT64 = 55
GAL_ARITHMETIC_OP_LAST_CODE = 56
end
const GAL_BLANK_UINT8 = typemax(UInt8)
const GAL_BINARY_TMP_VALUE = GAL_BLANK_UINT8 - 1
const GAL_BLANK_INT8 = typemin(UInt8)
const GAL_BLANK_UINT16 = typemax(UInt16)
const GAL_BLANK_INT16 = typemin(UInt16)
const GAL_BLANK_UINT32 = typemax(UInt32)
const GAL_BLANK_INT32 = typemin(UInt32)
const GAL_BLANK_UINT64 = typemax(UInt64)
const GAL_BLANK_INT64 = typemin(UInt64)
const GAL_BLANK_FLOAT32 = NaN
const GAL_BLANK_FLOAT64 = NaN
const GAL_BLANK_STRING = "n/a"
const GAL_BLANK_SIZE_T = GAL_BLANK_UINT64
const GAL_BLANK_LONG = GAL_BLANK_INT64
const GAL_BLANK_ULONG = GAL_BLANK_UINT64
const GAL_CONFIG_VERSION = "0.11"
# const GAL_CONFIG_HAVE_LIBGIT2 = yes
# Skipping MacroDefinition: GAL_CONFIG_HAVE_FITS_IS_REENTRANT @ HAVE_FITS_IS_REENTRANT @
const GAL_CONFIG_HAVE_WCSLIB_VERSION = 1
const GAL_CONFIG_HAVE_PTHREAD_BARRIER = 0
const GAL_CONFIG_SIZEOF_LONG = 8
const GAL_CONFIG_SIZEOF_SIZE_T = 8
const GAL_DATA_FLAG_SIZE = 1
const GAL_DATA_FLAG_BLANK_CH = 0x01
const GAL_DATA_FLAG_HASBLANK = 0x02
const GAL_DATA_FLAG_SORT_CH = 0x04
const GAL_DATA_FLAG_SORTED_I = 0x08
const GAL_DATA_FLAG_SORTED_D = 0x10
const GAL_DATA_FLAG_MAXFLAG = GAL_DATA_FLAG_SORTED_D
struct gal_data_t
array::Ptr{Cvoid}
type::UInt8
ndim::Csize_t
dsize::Ptr{Csize_t}
size::Csize_t
quietmmap::Cint
mmapname::Cstring
minmapsize::Csize_t
nwcs::Cint
wcs::Ptr{wcsprm}
flag::UInt8
status::Cint
name::Cstring
unit::Cstring
comment::Cstring
disp_fmt::Cint
disp_width::Cint
disp_precision::Cint
next::Ptr{gal_data_t}
block::Ptr{gal_data_t}
end
# Skipping MacroDefinition: GAL_DIMENSION_FLT_TO_INT ( FLT ) ( ( FLT ) - ( long ) ( FLT ) > 0.5f ? ( long ) ( FLT ) + 1 : ( long ) ( FLT ) )
# Skipping MacroDefinition: GAL_DIMENSION_NEIGHBOR_OP ( index , ndim , dsize , connectivity , dinc , operation ) { uint32_t gdn_bitstr = 0 ; size_t nind , gdn_ind = index ; uint8_t gdn_D , * gdn_is_start , * gdn_is_end , * gdn_is_edge , gdn_one = 1 ; /* A small sanity check. */ if ( connectivity > ndim ) error ( EXIT_FAILURE , 0 , "%s: connectivity value (%d) is larger " "than the number of dimensions (%zu)" , __func__ , ( int ) connectivity , ndim ) ; /* Initialize the start/end. */ gdn_is_start = ( uint8_t * ) ( & gdn_bitstr ) ; gdn_is_end = ( uint8_t * ) ( & gdn_bitstr ) + 1 ; /* Start with the slowest dimension and see if it is on the edge */ /* or not, similar to `gal_dimension_index_to_coord'. In the */ /* process, also fill the `connectivity==1' neighbors. */ for ( gdn_D = 0 ; gdn_D < ndim ; ++ gdn_D ) { /* If this dimension is only one element wide, no neighbors. */ if ( ( dsize ) [ gdn_D ] == 1 ) { * gdn_is_start |= 1 << gdn_D ; * gdn_is_end |= 1 << gdn_D ; } else { if ( gdn_ind / ( dinc ) [ gdn_D ] ) { /* We are at the end of this dimension. */ if ( gdn_ind / ( dinc ) [ gdn_D ] == ( dsize ) [ gdn_D ] - 1 ) { * gdn_is_end |= gdn_one << gdn_D ; nind = ( index ) - ( dinc ) [ gdn_D ] ; { operation ; } ; } /* Middle of the dimension: both +1 and -1 possible. */ else { nind = ( index ) - ( dinc ) [ gdn_D ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ gdn_D ] ; { operation ; } ; } } else { * gdn_is_start |= gdn_one << gdn_D ; nind = ( index ) + ( dinc ) [ gdn_D ] ; { operation ; } ; } } /* Change `ind' to the remainder of previous dimensions. */ gdn_ind %= dinc [ gdn_D ] ; } /* We now know if the index is on the edge or not. During the */ /* process above, we also finished the `connectivity==1' case. */ /* So we'll just have to find the rest of the terms. */ if ( connectivity > 1 && ndim > 1 ) { /* Finalize `is_edge' (bit value 1 for respective dim.). */ gdn_is_edge = ( uint8_t * ) ( & gdn_bitstr ) + 2 ; * gdn_is_edge = * gdn_is_start | * gdn_is_end ; /* Shared between 2D and 3D datasets. */ if ( * gdn_is_edge ) { /* NOTE: these are bitwise operators, not conditionals. */ if ( ! ( * gdn_is_start & ( gdn_one | gdn_one << 1 ) ) ) { nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] ; { operation ; } ; } if ( ! ( * gdn_is_start & gdn_one ) && ! ( * gdn_is_end & gdn_one << 1 ) ) { nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & gdn_one ) && ! ( * gdn_is_start & gdn_one << 1 ) ) { nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & ( gdn_one | gdn_one << 1 ) ) ) { nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] ; { operation ; } ; } } else { nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] ; { operation ; } ; nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] ; { operation ; } ; } /* Only for 3D datasets. */ if ( ndim > 2 ) { /* Connectivity == 2. */ if ( * gdn_is_edge ) for ( gdn_D = 0 ; gdn_D < 2 ; ++ gdn_D ) { if ( ! ( * gdn_is_start & ( gdn_one << gdn_D | gdn_one << 2 ) ) ) { nind = ( index ) - ( dinc ) [ gdn_D ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_start & gdn_one << gdn_D ) && ! ( * gdn_is_end & gdn_one << 2 ) ) { nind = ( index ) - ( dinc ) [ gdn_D ] + ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & gdn_one << gdn_D ) && ! ( * gdn_is_start & gdn_one << 2 ) ) { nind = ( index ) + ( dinc ) [ gdn_D ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & ( gdn_one << gdn_D | gdn_one << 2 ) ) ) { nind = ( index ) + ( dinc ) [ gdn_D ] + ( dinc ) [ 2 ] ; { operation ; } ; } } else for ( gdn_D = 0 ; gdn_D < 2 ; ++ gdn_D ) { nind = ( index ) - ( dinc ) [ gdn_D ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) - ( dinc ) [ gdn_D ] + ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ gdn_D ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ gdn_D ] + ( dinc ) [ 2 ] ; { operation ; } ; } /* Connectivity == 3. */ if ( connectivity > 2 ) { if ( * gdn_is_edge ) { if ( ! * gdn_is_start ) { nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_start & gdn_one ) && ! ( * gdn_is_start & gdn_one << 1 ) && ! ( * gdn_is_end & gdn_one << 2 ) ) { nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_start & gdn_one ) && ! ( * gdn_is_end & gdn_one << 1 ) && ! ( * gdn_is_start & gdn_one << 2 ) ) { nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_start & gdn_one ) && ! ( * gdn_is_end & gdn_one << 1 ) && ! ( * gdn_is_end & gdn_one << 2 ) ) { nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & gdn_one ) && ! ( * gdn_is_start & gdn_one << 1 ) && ! ( * gdn_is_start & gdn_one << 2 ) ) { nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & gdn_one ) && ! ( * gdn_is_start & gdn_one << 1 ) && ! ( * gdn_is_end & gdn_one << 2 ) ) { nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! ( * gdn_is_end & gdn_one ) && ! ( * gdn_is_end & gdn_one << 1 ) && ! ( * gdn_is_start & gdn_one << 2 ) ) { nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; } if ( ! * gdn_is_end ) { nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; } } else { nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) - ( dinc ) [ 0 ] - ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) - ( dinc ) [ 0 ] + ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] - ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] - ( dinc ) [ 2 ] ; { operation ; } ; nind = ( index ) + ( dinc ) [ 0 ] + ( dinc ) [ 1 ] + ( dinc ) [ 2 ] ; { operation ; } ; } } } } /* For a check. */ /* printf("\nEdge bit flags: "); */ /* gal_data_bit_print_stream(&gdn_bitstr, 3); printf("\n"); */ }
const GAL_FITS_MAX_NDIM = 999
const GAL_FITS_KEY_TITLE_START = " / "
struct gal_fits_list_key_t
kfree::Cint
vfree::Cint
cfree::Cint
type::UInt8
keyname::Cstring
value::Ptr{Cvoid}
comment::Cstring
unit::Cstring
next::Ptr{gal_fits_list_key_t}
end
@cenum gal_interpolate_close_metric::UInt32 begin
GAL_INTERPOLATE_CLOSE_METRIC_INVALID = 0
GAL_INTERPOLATE_CLOSE_METRIC_RADIAL = 1
GAL_INTERPOLATE_CLOSE_METRIC_MANHATTAN = 2
end
@cenum gal_interpolate_1D_types::UInt32 begin
GAL_INTERPOLATE_1D_INVALID = 0
GAL_INTERPOLATE_1D_LINEAR = 1
GAL_INTERPOLATE_1D_POLYNOMIAL = 2
GAL_INTERPOLATE_1D_CSPLINE = 3
GAL_INTERPOLATE_1D_CSPLINE_PERIODIC = 4
GAL_INTERPOLATE_1D_AKIMA = 5
GAL_INTERPOLATE_1D_AKIMA_PERIODIC = 6
GAL_INTERPOLATE_1D_STEFFEN = 7
end
const GAL_LABEL_INIT = -1
const GAL_LABEL_RIVER = -2
const GAL_LABEL_TMPCHECK = -3
struct gal_list_str_t
v::Cstring
next::Ptr{gal_list_str_t}
end
struct gal_list_i32_t
v::Int32
next::Ptr{gal_list_i32_t}
end
struct gal_list_sizet_t
v::Csize_t
next::Ptr{gal_list_sizet_t}
end
struct gal_list_f32_t
v::Cfloat
next::Ptr{gal_list_f32_t}
end
struct gal_list_f64_t
v::Cdouble
next::Ptr{gal_list_f64_t}
end
struct gal_list_void_t
v::Ptr{Cvoid}
next::Ptr{gal_list_void_t}
end
struct gal_list_osizet_t
v::Csize_t
s::Cfloat
next::Ptr{gal_list_osizet_t}
end
struct gal_list_dosizet_t
v::Csize_t
s::Cfloat
prev::Ptr{gal_list_dosizet_t}
next::Ptr{gal_list_dosizet_t}
end
const GAL_POLYGON_MAX_CORNERS = 50
const GAL_POLYGON_ROUND_ERR = 1.0e-5
struct gal_qsort_index_multi
values::Ptr{Cfloat}
index::Csize_t
end
const GAL_SPECLINES_ANGSTROM_SIIRED = 6731
const GAL_SPECLINES_ANGSTROM_SII = 6724
const GAL_SPECLINES_ANGSTROM_SIIBLUE = 6717
const GAL_SPECLINES_ANGSTROM_NIIRED = 6584
const GAL_SPECLINES_ANGSTROM_NII = 6566
const GAL_SPECLINES_ANGSTROM_HALPHA = 6562.8
const GAL_SPECLINES_ANGSTROM_NIIBLUE = 6548
const GAL_SPECLINES_ANGSTROM_OIIIRED = 5007
const GAL_SPECLINES_ANGSTROM_OIII = 4983
const GAL_SPECLINES_ANGSTROM_OIIIBLUE = 4959
const GAL_SPECLINES_ANGSTROM_HBETA = 4861.36
const GAL_SPECLINES_ANGSTROM_HEIIRED = 4686
const GAL_SPECLINES_ANGSTROM_HGAMMA = 4340.46
const GAL_SPECLINES_ANGSTROM_HDELTA = 4101.74
const GAL_SPECLINES_ANGSTROM_HEPSILON = 3970.07
const GAL_SPECLINES_ANGSTROM_NEIII = 3869
const GAL_SPECLINES_ANGSTROM_OIIRED = 3729
const GAL_SPECLINES_ANGSTROM_OII = 3727.5
const GAL_SPECLINES_ANGSTROM_OIIBLUE = 3726
const GAL_SPECLINES_ANGSTROM_BLIMIT = 3646
const GAL_SPECLINES_ANGSTROM_MGIIRED = 2803
const GAL_SPECLINES_ANGSTROM_MGII = 2799.5
const GAL_SPECLINES_ANGSTROM_MGIIBLUE = 2796
const GAL_SPECLINES_ANGSTROM_CIIIRED = 1909
const GAL_SPECLINES_ANGSTROM_CIII = 1908
const GAL_SPECLINES_ANGSTROM_CIIIBLUE = 1907
const GAL_SPECLINES_ANGSTROM_HEIIBLUE = 1640
const GAL_SPECLINES_ANGSTROM_LYALPHA = 1215.67
const GAL_SPECLINES_ANGSTROM_LYLIMIT = 912
const GAL_SPECLINES_NAME_SIIRED = "siired"
const GAL_SPECLINES_NAME_SII = "sii"
const GAL_SPECLINES_NAME_SIIBLUE = "siiblue"
const GAL_SPECLINES_NAME_NIIRED = "niired"
const GAL_SPECLINES_NAME_NII = "nii"
const GAL_SPECLINES_NAME_HALPHA = "halpha"
const GAL_SPECLINES_NAME_NIIBLUE = "niiblue"
const GAL_SPECLINES_NAME_OIIIRED = "oiiired"
const GAL_SPECLINES_NAME_OIII = "oiii"
const GAL_SPECLINES_NAME_OIIIBLUE = "oiiiblue"
const GAL_SPECLINES_NAME_HBETA = "hbeta"
const GAL_SPECLINES_NAME_HEIIRED = "heiired"
const GAL_SPECLINES_NAME_HGAMMA = "hgamma"
const GAL_SPECLINES_NAME_HDELTA = "hdelta"
const GAL_SPECLINES_NAME_HEPSILON = "hepsilon"
const GAL_SPECLINES_NAME_NEIII = "neiii"
const GAL_SPECLINES_NAME_OIIRED = "oiired"
const GAL_SPECLINES_NAME_OII = "oii"
const GAL_SPECLINES_NAME_OIIBLUE = "oiiblue"
const GAL_SPECLINES_NAME_BLIMIT = "blimit"
const GAL_SPECLINES_NAME_MGIIRED = "mgiired"
const GAL_SPECLINES_NAME_MGII = "mgii"
const GAL_SPECLINES_NAME_MGIIBLUE = "mgiiblue"
const GAL_SPECLINES_NAME_CIIIRED = "ciiired"
const GAL_SPECLINES_NAME_CIII = "ciii"
const GAL_SPECLINES_NAME_CIIIBLUE = "ciiiblue"
const GAL_SPECLINES_NAME_HEIIBLUE = "heiiblue"
const GAL_SPECLINES_NAME_LYALPHA = "lyalpha"
const GAL_SPECLINES_NAME_LYLIMIT = "lylimit"
@cenum gal_speclines_line_codes::UInt32 begin
GAL_SPECLINES_INVALID = 0
GAL_SPECLINES_SIIRED = 1
GAL_SPECLINES_SII = 2
GAL_SPECLINES_SIIBLUE = 3
GAL_SPECLINES_NIIRED = 4
GAL_SPECLINES_NII = 5
GAL_SPECLINES_HALPHA = 6
GAL_SPECLINES_NIIBLUE = 7
GAL_SPECLINES_OIIIRED = 8
GAL_SPECLINES_OIII = 9
GAL_SPECLINES_OIIIBLUE = 10
GAL_SPECLINES_HBETA = 11
GAL_SPECLINES_HEIIRED = 12
GAL_SPECLINES_HGAMMA = 13
GAL_SPECLINES_HDELTA = 14
GAL_SPECLINES_HEPSILON = 15
GAL_SPECLINES_NEIII = 16
GAL_SPECLINES_OIIRED = 17
GAL_SPECLINES_OII = 18
GAL_SPECLINES_OIIBLUE = 19
GAL_SPECLINES_BLIMIT = 20
GAL_SPECLINES_MGIIRED = 21
GAL_SPECLINES_MGII = 22
GAL_SPECLINES_MGIIBLUE = 23
GAL_SPECLINES_CIIIRED = 24
GAL_SPECLINES_CIII = 25
GAL_SPECLINES_CIIIBLUE = 26
GAL_SPECLINES_HEIIBLUE = 27
GAL_SPECLINES_LYALPHA = 28
GAL_SPECLINES_LYLIMIT = 29
end
const GAL_STATISTICS_SIG_CLIP_MAX_CONVERGE = 50
const GAL_STATISTICS_MODE_GOOD_SYM = Float32(0.2)
@cenum bin_status::UInt32 begin
GAL_STATISTICS_BINS_INVALID = 0
GAL_STATISTICS_BINS_REGULAR = 1
GAL_STATISTICS_BINS_IRREGULAR = 2
end
const GAL_TABLE_DEF_WIDTH_STR = 6
const GAL_TABLE_DEF_WIDTH_INT = 6
const GAL_TABLE_DEF_WIDTH_LINT = 10
const GAL_TABLE_DEF_WIDTH_FLT = 13
const GAL_TABLE_DEF_WIDTH_DBL = 18
const GAL_TABLE_DEF_PRECISION_INT = 0
const GAL_TABLE_DEF_PRECISION_FLT = 6
const GAL_TABLE_DEF_PRECISION_DBL = 14
@cenum gal_table_diplay_formats::UInt32 begin
GAL_TABLE_DISPLAY_FMT_INVALID = 0
GAL_TABLE_DISPLAY_FMT_STRING = 1
GAL_TABLE_DISPLAY_FMT_DECIMAL = 2
GAL_TABLE_DISPLAY_FMT_UDECIMAL = 3
GAL_TABLE_DISPLAY_FMT_OCTAL = 4
GAL_TABLE_DISPLAY_FMT_HEX = 5
GAL_TABLE_DISPLAY_FMT_FLOAT = 6
GAL_TABLE_DISPLAY_FMT_EXP = 7
GAL_TABLE_DISPLAY_FMT_GENERAL = 8
end
@cenum gal_table_types::UInt32 begin
GAL_TABLE_FORMAT_INVALID = 0
GAL_TABLE_FORMAT_TXT = 1
GAL_TABLE_FORMAT_AFITS = 2
GAL_TABLE_FORMAT_BFITS = 3
end
@cenum gal_table_where_to_search::UInt32 begin
GAL_TABLE_SEARCH_INVALID = 0
GAL_TABLE_SEARCH_NAME = 1
GAL_TABLE_SEARCH_UNIT = 2
GAL_TABLE_SEARCH_COMMENT = 3
end
const GAL_THREADS_BARRIER_DESTROY_NANOSECS = 1000
const pthread_barrierattr_t = Cint
const pthread_mutex_t = Ptr{Cvoid}
const pthread_cond_t = Ptr{Cvoid}
struct pthread_barrier_t
mutex::pthread_mutex_t
cond::pthread_cond_t
count::Csize_t
limit::Csize_t
condfinished::Csize_t
end
struct gal_threads_params
id::Csize_t
params::Ptr{Cvoid}
indexs::Ptr{Csize_t}
b::Ptr{pthread_barrier_t}
end
# Skipping MacroDefinition: GAL_TILE_PO_OISET ( IT , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) { IT * i = IN -> array ; gal_data_t * tpo_other = OTHER ; /* `OTHER' may be NULL. */ gal_data_t * tpo_oblock = OTHER ? gal_tile_block ( OTHER ) : NULL ; size_t tpo_s_e_i_junk [ 2 ] = { 0 , 0 } ; IT b , * tpo_st = NULL , * tpo_f = i + IN -> size ; size_t tpo_i_increment = 0 , tpo_num_i_inc = 1 ; size_t tpo_o_increment = 0 , tpo_num_o_inc = 1 ; int tpo_parse_other = ( OTHER && PARSE_OTHER ) ; gal_data_t * tpo_iblock = gal_tile_block ( IN ) ; OT * tpo_ost = NULL , * o = tpo_other ? tpo_other -> array : NULL ; int tpo_hasblank = CHECK_BLANK ? gal_blank_present ( IN , 0 ) : 0 ; size_t tpo_s_e_i [ 2 ] = { 0 , tpo_iblock -> size - 1 } ; /* -1: this is INCLUSIVE */ /* A small sanity check: if `OTHER' is given, and it is a block, */ /* then it must have the same size as `IN's block. On the other */ /* hand, when `OTHER' is a tile, its must have `IN's size. */ if ( tpo_parse_other ) { if ( OTHER == tpo_oblock ) /* `OTHER' is a block. */ { if ( gal_dimension_is_different ( tpo_iblock , tpo_oblock ) ) { /* `error' function, is a GNU extension, see above. */ fprintf ( stderr , "GAL_TILE_PO_OISET: when " "`PARSE_OTHER' is non-zero, the allocated " "block size of `IN' and `OTHER' must be " "equal, but they are not: %zu and %zu " "elements respectively\n" , tpo_iblock -> size , tpo_oblock -> size ) ; exit ( EXIT_FAILURE ) ; } } else if ( gal_dimension_is_different ( IN , OTHER ) ) { /* The `error' function, is a GNU extension and this */ /* is a header, not a library which the user has to */ /* compile every time (on their own system). */ fprintf ( stderr , "GAL_TILE_PO_OISET: when " "`PARSE_OTHER' is non-zero, the sizes of `IN' " "and `OTHER' must be equal (in all " "dimensions), but they are not: %zu and %zu " "elements respectively\n" , IN -> size , tpo_other -> size ) ; exit ( EXIT_FAILURE ) ; } } /* Write the blank value for the input type into `b'. */ gal_blank_write ( & b , tpo_iblock -> type ) ; /* If this is a tile, not a full block, then we need to set the */ /* starting pointers (`tpo_st' and `tpo_ost'). The latter needs */ /* special attention: if it is a block, then we will use the */ /* the same starting element as the input tile. If `OTHER' is a */ /* tile, then use its own starting position (recall that we have */ /* already made sure that `IN' and `OTHER' have the same size. */ if ( IN != tpo_iblock ) { tpo_st = gal_tile_start_end_ind_inclusive ( IN , tpo_iblock , tpo_s_e_i ) ; if ( tpo_parse_other ) tpo_ost = ( OTHER == tpo_oblock ? ( ( OT * ) ( tpo_oblock -> array ) + ( tpo_st - ( IT * ) ( tpo_iblock -> array ) ) ) : gal_tile_start_end_ind_inclusive ( tpo_other , tpo_oblock , tpo_s_e_i_junk ) ) ; } /* Go over contiguous patches of memory. */ while ( tpo_s_e_i [ 0 ] + tpo_i_increment <= tpo_s_e_i [ 1 ] ) { /* If we are on a tile, reset `i' and `o'. */ if ( IN != tpo_iblock ) { tpo_f = ( ( i = tpo_st + tpo_i_increment ) + IN -> dsize [ IN -> ndim - 1 ] ) ; if ( tpo_parse_other ) o = tpo_ost + tpo_o_increment ; } /* Do the operation depending the nature of the blank value. */ /* Recall that for integer types, the blank value must be */ /* checked with `=='. But for floats, the blank value can be */ /* a NaN. Recall that a NAN will fail any comparison */ /* including `=='. So when the blank value is not equal to */ /* itself, then it is floating point and is a NAN. In that */ /* case, the only way to check if a data element is blank or */ /* not is to see if the value of each element is equal to */ /* itself or not. */ if ( tpo_hasblank ) { if ( b == b ) do { if ( * i != b ) { OP ; } if ( tpo_parse_other ) ++ o ; } while ( ++ i < tpo_f ) ; else do { if ( * i == * i ) { OP ; } if ( tpo_parse_other ) ++ o ; } while ( ++ i < tpo_f ) ; } else do { { OP ; } if ( tpo_parse_other ) ++ o ; } while ( ++ i < tpo_f ) ; /* Set the incrementation. On a fully allocated iblock (when */ /* `IN==tpo_iblock'), we have already gone through the whole */ /* array, so we'll set the incrementation to the size of the */ /* whole block. This will stop the `while' loop above. On a */ /* tile, we need to increment to the next contiguous patch */ /* of memory to continue parsing this tile. */ tpo_i_increment += ( IN == tpo_iblock ? tpo_iblock -> size : gal_tile_block_increment ( tpo_iblock , IN -> dsize , tpo_num_i_inc ++ , NULL ) ) ; /* Similarly, increment the other array if necessary. Like */ /* the above, when `OTHER' is a full block, we'll just use */ /* the same increment as `IN'. Otherwise, when `OTHER' is a */ /* tile, calculate its increment based on its own block. */ if ( tpo_parse_other ) { if ( OTHER == tpo_oblock ) tpo_o_increment = tpo_i_increment ; else tpo_o_increment += gal_tile_block_increment ( tpo_oblock , tpo_other -> dsize , tpo_num_o_inc ++ , NULL ) ; } } /* This is done in case the caller doesn't need `o' to avoid */ /* compiler warnings. */ o = o ? o + 0 : NULL ; }
# Skipping MacroDefinition: GAL_TILE_PO_OSET ( OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) { switch ( tpo_iblock -> type ) { case GAL_TYPE_UINT8 : GAL_TILE_PO_OISET ( uint8_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT8 : GAL_TILE_PO_OISET ( int8_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT16 : GAL_TILE_PO_OISET ( uint16_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT16 : GAL_TILE_PO_OISET ( int16_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT32 : GAL_TILE_PO_OISET ( uint32_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT32 : GAL_TILE_PO_OISET ( int32_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT64 : GAL_TILE_PO_OISET ( uint64_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT64 : GAL_TILE_PO_OISET ( int64_t , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_FLOAT32 : GAL_TILE_PO_OISET ( float , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_FLOAT64 : GAL_TILE_PO_OISET ( double , OT , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; default : { /* `error' function might not be available for the user. */ fprintf ( stderr , "GAL_TILE_PO_OSET: type code %d not recognized" , tpo_iblock -> type ) ; exit ( EXIT_FAILURE ) ; } } }
# Skipping MacroDefinition: GAL_TILE_PARSE_OPERATE ( IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) { gal_data_t * tpo_iblock = gal_tile_block ( IN ) ; gal_data_t * tpo_oblock = OTHER ? gal_tile_block ( OTHER ) : NULL ; /* First set the OTHER type. */ if ( OTHER ) switch ( tpo_oblock -> type ) { case GAL_TYPE_UINT8 : GAL_TILE_PO_OSET ( uint8_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT8 : GAL_TILE_PO_OSET ( int8_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT16 : GAL_TILE_PO_OSET ( uint16_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT16 : GAL_TILE_PO_OSET ( int16_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT32 : GAL_TILE_PO_OSET ( uint32_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT32 : GAL_TILE_PO_OSET ( int32_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_UINT64 : GAL_TILE_PO_OSET ( uint64_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_INT64 : GAL_TILE_PO_OSET ( int64_t , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_FLOAT32 : GAL_TILE_PO_OSET ( float , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; case GAL_TYPE_FLOAT64 : GAL_TILE_PO_OSET ( double , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; break ; default : { fprintf ( stderr , "type code %d not recognized in " "`GAL_TILE_PARSE_OPERATE'" , tpo_oblock -> type ) ; exit ( EXIT_FAILURE ) ; } } else /* When `OTHER==NULL', its type is irrelevant, we'll just use */ /*`int' as a place holder. */ GAL_TILE_PO_OSET ( int , IN , OTHER , PARSE_OTHER , CHECK_BLANK , OP ) ; }
struct gal_tile_two_layer_params
tilesize::Ptr{Csize_t}
numchannels::Ptr{Csize_t}
remainderfrac::Cfloat
workoverch::UInt8
checktiles::UInt8
oneelempertile::UInt8
ndim::Csize_t
tottiles::Csize_t
tottilesinch::Csize_t
totchannels::Csize_t
channelsize::Ptr{Csize_t}
numtiles::Ptr{Csize_t}
numtilesinch::Ptr{Csize_t}
tilecheckname::Cstring
permutation::Ptr{Csize_t}
firsttsize::Ptr{Csize_t}
tiles::Ptr{gal_data_t}
channels::Ptr{gal_data_t}
end
const GAL_TXT_DELIMITERS = " ,\t\f\v"
const GAL_TXT_MAX_FMT_LENGTH = 20
@cenum gal_txt_line_status_enums::UInt32 begin
GAL_TXT_LINESTAT_INVALID = 0
GAL_TXT_LINESTAT_BLANK = 1
GAL_TXT_LINESTAT_COMMENT = 2
GAL_TXT_LINESTAT_DATAROW = 3
end
@cenum gal_types::UInt32 begin
GAL_TYPE_INVALID = 0
GAL_TYPE_BIT = 1
GAL_TYPE_UINT8 = 2
GAL_TYPE_INT8 = 3
GAL_TYPE_UINT16 = 4
GAL_TYPE_INT16 = 5
GAL_TYPE_UINT32 = 6
GAL_TYPE_INT32 = 7
GAL_TYPE_UINT64 = 8
GAL_TYPE_INT64 = 9
GAL_TYPE_FLOAT32 = 10
GAL_TYPE_FLOAT64 = 11
GAL_TYPE_COMPLEX32 = 12
GAL_TYPE_COMPLEX64 = 13
GAL_TYPE_STRING = 14
GAL_TYPE_STRLL = 15
end
const GAL_TYPE_SIZE_T = GAL_TYPE_UINT64
const GAL_TYPE_LONG = GAL_TYPE_INT64
const GAL_TYPE_ULONG = GAL_TYPE_UINT64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment