From 3ff9e34318c53133ae460553e7d28cc27f9991e0 Mon Sep 17 00:00:00 2001 From: d3v-null Date: Mon, 11 Nov 2024 13:10:51 +0800 Subject: [PATCH] !PATCHED! update marlu0.15 mwalib1.8 fitsio0.21.6 - FitsFile.file_path() - no CFITSIO_VERSION --- Cargo.lock | 33 ++++++++++++++++++++------------- Cargo.toml | 8 ++++---- src/cli.rs | 5 ++--- src/io/mwaf.rs | 13 ++++++++----- 4 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f42a7e9..a4a8200 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,6 +99,15 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "autotools" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef941527c41b0fc0dd48511a8154cd5fc7e29200a0ff8b7203c5d777dbc795cf" +dependencies = [ + "cc", +] + [[package]] name = "backtrace" version = "0.3.74" @@ -671,9 +680,9 @@ dependencies = [ [[package]] name = "fitsio" -version = "0.20.0" +version = "0.21.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c31e99e291587ab50840bdf7e647187355978e93fdfc4c9f0d76b8e53e345d" +checksum = "0bdc9559065f29d3d8ae5c36eb127fc87ce4fcbbedd44c0094f8ff13453dbee0" dependencies = [ "fitsio-sys", "libc", @@ -681,11 +690,11 @@ dependencies = [ [[package]] name = "fitsio-sys" -version = "0.4.0" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3189ae01f4bcdb8e6b90ec9efe5575a1b12c3e63298bde9fc45694fcc488a595" +checksum = "3d737a0c9a1bd2579ea17ff53b7cbd46290e2dc8d3a30b9a811e156660181043" dependencies = [ - "libc", + "autotools", "pkg-config", ] @@ -941,9 +950,9 @@ dependencies = [ [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lexical" @@ -1088,9 +1097,8 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "marlu" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "207d8571a6c2fe51ba60e79bc8f840ae7bb0678168d25d61eb56fabebfd9764d" +version = "0.15.0" +source = "git+https://github.com/MWATelescope/Marlu?branch=mwalib-1.8.0#4cfad7ac12e4f362f5102c2b391dcecfb4d27585" dependencies = [ "approx", "built", @@ -1140,9 +1148,8 @@ dependencies = [ [[package]] name = "mwalib" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268aa01c4343e7250273fd839912fe807df701975a586d488a865238ed16471a" +version = "1.8.0" +source = "git+https://github.com/MWATelescope/mwalib?branch=pyo3_stub_chrono_fix#ec7225dcddb82cbc837877746ac184ffa22744fe" dependencies = [ "built", "cbindgen", diff --git a/Cargo.toml b/Cargo.toml index a981b8f..f5c687d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ indicatif = { version = "0.17.0", features = ["rayon"] } itertools = "0.10.0" lazy_static = "1.4.0" log = "0.4.0" -marlu = "0.14.0" +marlu = "0.15.0" regex = "1.4.0" thiserror = "1.0.0" errorfunctions = "0.2.0" @@ -66,7 +66,7 @@ csv = "1.1" float-cmp = "0.9" glob = "0.3" lexical = "6.0" -marlu = { version = "0.14.0", features = ["approx"] } +marlu = { version = "0.15.0", features = ["approx"] } ndarray = { version = "0.16.0", features = ["approx"] } tempfile = "3.3" @@ -93,7 +93,7 @@ opt-level = 3 [patch.crates-io] # marlu = { path = "../Marlu" } -# marlu = { git = "https://github.com/MWATelescope/Marlu", branch = "birli-150" } +marlu = { git = "https://github.com/MWATelescope/Marlu", branch = "mwalib-1.8.0" } # mwalib = { path = "../mwalib" } -# mwalib = { git = "https://github.com/MWATelescope/mwalib", branch = "digital_gains_plus" } +mwalib = { git = "https://github.com/MWATelescope/mwalib", branch = "pyo3_stub_chrono_fix" } # aoflagger_sys = { git = "https://github.com/MWATelescope/rust-aoflagger", branch = "sonoma-fix" } diff --git a/src/cli.rs b/src/cli.rs index 4c44ea4..c1cfd7f 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -13,8 +13,8 @@ use indicatif::{ProgressDrawTarget, ProgressStyle}; use itertools::{izip, Itertools}; use log::{debug, info, trace, warn}; use mwalib::{ - built_info::PKG_VERSION as MWALIB_PKG_VERSION, fitsio_sys::CFITSIO_VERSION, CableDelaysApplied, - CorrelatorContext, GeometricDelaysApplied, MWAVersion, + built_info::PKG_VERSION as MWALIB_PKG_VERSION, CableDelaysApplied, CorrelatorContext, + GeometricDelaysApplied, MWAVersion, }; use prettytable::{format as prettyformat, row, table}; @@ -98,7 +98,6 @@ pub fn fmt_build_info(f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { writeln!(f, "libraries:")?; writeln!(f, "- marlu v{MARLU_PKG_VERSION}")?; writeln!(f, "- mwalib v{MWALIB_PKG_VERSION}")?; - writeln!(f, "- cfitsio (bindings) v{CFITSIO_VERSION}")?; cfg_if! { if #[cfg(feature = "aoflagger")] { diff --git a/src/io/mwaf.rs b/src/io/mwaf.rs index 5d6b366..543bc48 100644 --- a/src/io/mwaf.rs +++ b/src/io/mwaf.rs @@ -13,10 +13,13 @@ use std::{ path::{Path, PathBuf}, }; -use fitsio::{tables::ColumnDataType, tables::ColumnDescription, FitsFile}; use indicatif::{MultiProgress, ProgressBar, ProgressDrawTarget, ProgressStyle}; use itertools::Itertools; -use marlu::{fitsio, fitsio_sys, mwalib, ndarray, rayon, VisSelection}; +use marlu::{ + fitsio, + fitsio::{tables::ColumnDataType, tables::ColumnDescription, FitsFile}, + fitsio_sys, mwalib, ndarray, rayon, VisSelection, +}; use mwalib::{ CorrelatorContext, MWAVersion, _get_required_fits_key, _open_hdu, fits_open_hdu, get_required_fits_key, @@ -476,7 +479,7 @@ impl FlagFileSet { fitsio::errors::check_status(status).map_err(|e| FitsIO { fits_error: e, - fits_filename: fptr.filename.clone(), + fits_filename: fptr.file_path().to_path_buf(), hdu_num: 2, source_file: file!(), source_line: line!(), @@ -659,7 +662,7 @@ impl FlagFileSet { if header.num_rows != header.num_timesteps * baselines { return Err(ReadMwafError::Generic(format!( "File {:?}: Expected NSCANS * NANTENNA * (NANTENNA+1) / 2 = NAXIS2, found {} * {} != {}", - fptr.filename, + fptr.file_path(), header.num_timesteps, baselines, header.num_rows ))); } @@ -834,7 +837,7 @@ impl FlagFileSet { } fitsio::errors::check_status(status).map_err(|e| FitsIO { fits_error: e, - fits_filename: fptr.filename.clone(), + fits_filename: fptr.file_path().to_path_buf(), hdu_num: 1, source_file: file!(), source_line: line!(),