Skip to main content

Args

Struct Args 

Source
pub struct Args {
Show 62 fields pub fits: Option<String>, pub col: usize, pub cmap: String, pub width: u32, pub out: Option<String>, pub no_border: bool, pub transparent: bool, pub no_cbar: bool, pub min: Option<f64>, pub max: Option<f64>, pub gamma: f64, pub log: bool, pub symlog: bool, pub hist: bool, pub linthresh: Option<f64>, pub asinh: bool, pub neg_mode: String, pub bad_color: Option<InputColor>, pub bg_color: Option<InputColor>, pub planck_log: bool, pub scale: f64, pub latex: bool, pub units: Option<String>, pub input_coord: String, pub output_coord: String, pub rotate_to: Option<String>, pub roll: f64, pub projection: String, pub lon: Option<f64>, pub lat: Option<f64>, pub fov: f64, pub res: f64, pub local_graticule: bool, pub local_grat_dlat: f64, pub local_grat_dlon: f64, pub grat_line_width: u32, pub no_text: bool, pub no_title: bool, pub no_scale_text: bool, pub title: Option<String>, pub verbose: bool, pub no_downgrade: bool, pub graticule: bool, pub grat_coord: Option<String>, pub grat_coord_overlay: Option<String>, pub grat_overlay_color: InputColor, pub grat_labels: bool, pub grat_par: f64, pub grat_mer: f64, pub extend: String, pub tick_direction: String, pub tick_font_size: Option<f32>, pub units_font_size: Option<f32>, pub llabel: Option<String>, pub rlabel: Option<String>, pub label_font_size: Option<f32>, pub mask_file: Option<String>, pub mask_below: Option<f64>, pub mask_above: Option<f64>, pub maskfill_color: String, pub mask_coord: Option<String>, pub fast_render: bool,
}
Expand description

Simple HEALPix Mollweide plotter

Fields§

§fits: Option<String>

Input FITS file

§col: usize

Column index

§cmap: String

Colormap name

§width: u32

Output width in pixels

§out: Option<String>

Output filename

§no_border: bool

Disable map border

§transparent: bool

Transparent background

§no_cbar: bool

Disable colorbar

§min: Option<f64>

Lower color scale limit

§max: Option<f64>

Upper color scale limit

§gamma: f64

Gamma correction

§log: bool

Log scale

§symlog: bool

Symmetric log

§hist: bool

Histogram equalization

§linthresh: Option<f64>

Linear region width for symlog

§asinh: bool

Asinh scaling

§neg_mode: String

Negative/invalid handling: zero or unseen

§bad_color: Option<InputColor>

Bad pixel color: auto, gray, or r,g,b,a

§bg_color: Option<InputColor>

Background pixel color: transparent, gray, or r,g,b,a

§planck_log: bool

Planck logarithmic scaling

§scale: f64

Factor that multiplies the data itself for unit conversions.

§latex: bool

Enable LaTeX-like mathematical rendering for colorbar labels

§units: Option<String>

Units string for colorbar (supports LaTeX syntax when –latex is enabled)

§input_coord: String

Input coordinate system: gal, eq, ecl

§output_coord: String

Output coordinate system: gal, eq, ecl

§rotate_to: Option<String>

Rotate view so that (lon,lat) becomes the new center [degrees]

§roll: f64

Roll angle around the new center [degrees]

§projection: String

Projection type: mollweide, gnomonic, or hammer

§lon: Option<f64>

Center longitude in degrees (gnomonic: projection center; mollweide: rotation center)

§lat: Option<f64>

Center latitude in [degrees] (gnomonic: projection center; mollweide: rotation center)

§fov: f64

Field of view width in arcminutes (gnomonic projection only)

§res: f64

Resolution in arcmin/pixel (gnomonic projection only)

§local_graticule: bool

Enable local grid graticule for gnomonic projection

§local_grat_dlat: f64

Graticule spacing for parallels [degrees] (gnomonic projection only)

§local_grat_dlon: f64

Graticule spacing for meridians [degrees] (gnomonic projection only)

§grat_line_width: u32

Graticule line width in pixels (applies to both local and mollweide graticules)

§no_text: bool

Disable text labels (title and resolution/pixel size labels)

§no_title: bool

Disable title display

§no_scale_text: bool

Disable text scaling with FOV (use constant text sizes, gnomonic projection only)

§title: Option<String>

Custom title for map (gnomonic: default is (lon, lat) at center)

§verbose: bool

Allows for more verbose output

§no_downgrade: bool

Disable automatic downgrading of high-resolution maps for performance

§graticule: bool

Enable graticule overlay (primary coordinate system for mollweide map)

§grat_coord: Option<String>

Primary graticule coordinate system: gal, eq, ecl (defaults to the map’s input coordinate system)

§grat_coord_overlay: Option<String>

Secondary graticule coordinate system to overlay (e.g., show FK5 over Galactic) Specify one of: gal, eq, ecl. If set with –grat-coord, both systems will be displayed.

§grat_overlay_color: InputColor

Color for secondary graticule overlay (hex #RRGGBB or r,g,b,a format) Default: yellow (#FFFF00) for good contrast on dark colormaps

§grat_labels: bool

Show coordinate labels on graticule lines (shows lat/lon values)

§grat_par: f64

Graticule spacing for parallels [degrees]

§grat_mer: f64

Graticule spacing for meridians [degrees]

§extend: String

Extend colorbar with arrows at the ends: none, min, max, or both

§tick_direction: String

Colorbar tick direction: inward/in (default) or outward/out

§tick_font_size: Option<f32>

Tick label font size in points (default: auto-scaled, 12pt at width 800px)

§units_font_size: Option<f32>

Units text font size in points (default: auto-scaled, 16pt at width 800px)

§llabel: Option<String>

Text label for top-left corner

§rlabel: Option<String>

Text label for top-right corner

§label_font_size: Option<f32>

Font size for labels in points (default: auto-scaled, 16pt at width 800px)

§mask_file: Option<String>

Path to mask FITS file (binary mask: 0=masked, 1=valid)

§mask_below: Option<f64>

Mask pixels with values below this threshold

§mask_above: Option<f64>

Mask pixels with values above this threshold

§maskfill_color: String

Color for masked regions: transparent, gray, or r,g,b,a format

§mask_coord: Option<String>

Coordinate system of mask file (gal, eq, ecl) - auto-detects if not specified

§fast_render: bool

Fast render mode: skip graticule, colorbar, and labels for faster iteration

Implementations§

Source§

impl Args

Source

pub fn validate_projection_args(&self) -> Result<(), String>

Validate that projection-specific arguments are only used with their respective projection

Source

pub fn resolve_config(&self) -> Result<PlotConfig, String>

Source

pub fn get_output_filename(&self) -> String

Determine output filename from –out flag or input FITS filename.

§Logic
  1. If –out is explicitly provided, use it
  2. If input FITS file is provided, use it with .fits → .pdf extension
  3. If neither, use “map2fig_test.pdf” as fallback
Source

pub fn describe_coord_transform(&self) -> Option<String>

Check if coordinate transformation is needed.

Returns Some(from_to_string) if input_coord != output_coord

Source

pub fn resolve_view_transform(&self) -> Result<ViewTransform, String>

Trait Implementations§

Source§

impl Args for Args

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

impl CommandFactory for Args

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Debug for Args

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Args

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Parser for Args

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnwindSafe for Args

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
Source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

Source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
Source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, Dst> ConvAsUtil<Dst> for T

Source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
Source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
Source§

impl<T> ConvUtil for T

Source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
Source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
Source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
Source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
Source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<Src> TryFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

Source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<Src> ValueFrom<Src> for Src

Source§

type Err = NoError

The error type produced by a failed conversion.
Source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
Source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

Source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
Source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.