Skip to content

Initialization#1

Merged
pgbrodrick merged 2 commits into
isofit:mainfrom
jammont:init
Dec 19, 2024
Merged

Initialization#1
pgbrodrick merged 2 commits into
isofit:mainfrom
jammont:init

Conversation

@jammont

@jammont jammont commented Dec 18, 2024

Copy link
Copy Markdown
Collaborator

Implements the isoplots package

Features

  • Implements a CLI that lazy loads the plotting modules
    • This enables the CLI to be added as a subcommand of the ISOFIT CLI as well as allow the modules to be dependent on isofit imports
  • Added a template.py script to be used when creating new plotting modules
  • Refactored plot_RTMs.py to follow the template and make it a bit easier to expand on in the future
  • Experimental feature plotting to terminal using plotext

The idea is that a user needs to only create new scripts under the isoplots/plots directory that conform to the template and they will be automatically detected and added to the CLI

Examples

Once PR'd and integrated into ISOFIT:

$ isofit plot
Usage: isofit plot [OPTIONS] COMMAND [ARGS]...

  ISOFIT Plotting Utilities

Options:
  --help  Show this message and exit.

Commands:
  rtms  Plots RTMs

Running the new RTMs script:

$ isofit plot rtms /Users/jamesmo/projects/isofit/dev/local/examples/20151026_SantaMonica/lut/D9p5W_6s.nc -c /Users/jamesmo/projects/isofit/dev/local/examples/20151026_SantaMonica/lut/D9p5W_6s.nc -in test1 -cn test2 -o test
Plotting RTMs
Loading /Users/jamesmo/projects/isofit/dev/local/examples/20151026_SantaMonica/lut/D9p5W_6s.nc
Detected NaNs in the following LUT variable and may cause issues: thermal_upwelling
Detected NaNs in the following LUT variable and may cause issues: thermal_downwelling
Loading /Users/jamesmo/projects/isofit/dev/local/examples/20151026_SantaMonica/lut/D9p5W_6s.nc
Detected NaNs in the following LUT variable and may cause issues: thermal_upwelling
Detected NaNs in the following LUT variable and may cause issues: thermal_downwelling
Wrote to: test/AOT550.png
Wrote to: test/H2OSTR.png
Finished
image

Converting the plots to the terminal:

$ isofit plot rtms /Users/jamesmo/projects/isofit/dev/local/examples/20151026_SantaMonica/lut/D9p5W_6s.nc -t -v transm_down_dif
image

@pgbrodrick pgbrodrick merged commit 224dc09 into isofit:main Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants