Skip to content

Commit

Permalink
Merge pull request DOI-USGS#133 from amystamile-usgs/cmp-notebooks
Browse files Browse the repository at this point in the history
Clean up comparison notebooks and fix vis.py
  • Loading branch information
amystamile-usgs authored May 22, 2024
2 parents c950c03 + 2e41dc7 commit 459231a
Show file tree
Hide file tree
Showing 14 changed files with 904 additions and 22,939 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,3 @@ To build the docs:
1. Browse to the `index.html` file in `docs/public` to open the docs. If needed, run a utility like `http-server` in the `docs/public` directory to serve the docs on localhost.

<hr>

## Status Report - November 2019

For full testing reports and example usage, please see the linked example Jupyter notebooks in the table below.

| Instrument | Jupyter Notebooks | Production Ready | Difference CSM -> ISIS (in pixels) | Difference ISIS -> CSM (in pixels) |
|:---------------------:|:-------------------------------------------------:|:-----------------:|:---------------------------------------:|:---------------------------------------:|
| MRO HiRISE | [link](examples/mro_hirise_isis_cmp.ipynb) | sub-pixel; in testing for production | sample mean=-2.0e-05; line mean=2.5e-08 | sample mean=-3.0e-08; line mean=1.2e-04 |
| MRO CTX | [link](examples/mro_ctx_isis_cmp.ipynb) | nearly sub-pixel; still in research | gross error in line | sample mean=0.0002; line mean=-0.07 |
| MEX HRSC | [link](examples/mex_hrsc_isis_cmp.ipynb) | sub-pixel; in testing for production | sample mean=0.000038; line mean=-0.000072 | sample mean=-0.000038 ; line mean=-7.512e-05 |
| LROC NAC | [link](examples/lrocnac_isis_cmp.ipynb) | sub-pixel; in testing for production | sample mean=-0.003; line mean=-0.0006 | sample mean=0.0005 line mean=0.003 |
| Kaguya Terrain Camera | [link](examples/kaguya_tc_isis_cmp.ipynb) | barely sub-pixel; in testing | sample mean=0.0001; line mean=0.00003 | sample mean=0.009; line mean=-1.242 |
| Messenger MDIS NAC | [link](examples/messenger_mdisnac_isis_cmp.ipynb) | sub-pixel; in testing for production | sample mean=-0.01; line mean=-0.003 | sample mean=0.01; line mean=0.003 |
| Cassini ISS NAC | [link](examples/cassini_isis_nac_cmp.ipynb) | sub-pixel; in testing for production | sample mean=-0.001; line mean=0.01 | sample mean=0.001; line mean=-0.01 |
| Cassini ISS WAC | [link](examples/cassini_isis_wac_cmp.ipynb) | sub-pixel; in testing for production | sample mean=0.001; line mean=0.004 | sample mean=-0.001; line mean=-0.004 |
| Dawn Framing Camera | [link](examples/dawn_fc_isis_cmp.ipynb) | sub-pixel; in testing for production | sample mean=-0.02; line mean=0.003 | sample mean=0.02; line mean=-0.003 |

The Difference column (CSM -> ISIS) represents the mean difference in pixels from running usgscsm's *image2ground* and then back to the camera using ISIS3's *campt* (ground2image). The Difference column (ISIS -> CSM) is simply the reverse starting with ISIS3 first with *campt* (image2ground) and then usgscsm's *ground2image*.
805 changes: 0 additions & 805 deletions examples/cassini_isis_nac_cmp.ipynb

This file was deleted.

826 changes: 0 additions & 826 deletions examples/cassini_isis_wac_cmp.ipynb

This file was deleted.

Binary file removed examples/data/N1702360370_1.IMG
Binary file not shown.
120 changes: 0 additions & 120 deletions examples/data/N1702360370_1.LBL

This file was deleted.

721 changes: 0 additions & 721 deletions examples/dawn_fc_isis_cmp.ipynb

This file was deleted.

16,658 changes: 0 additions & 16,658 deletions examples/kaguya_tc_isis_cmp.ipynb

This file was deleted.

693 changes: 0 additions & 693 deletions examples/lrocnac_isis_cmp.ipynb

This file was deleted.

804 changes: 0 additions & 804 deletions examples/messenger_mdisnac_isis_cmp.ipynb

This file was deleted.

691 changes: 0 additions & 691 deletions examples/mex_hrsc_isis_cmp.ipynb

This file was deleted.

847 changes: 0 additions & 847 deletions examples/mro_ctx_isis_cmp.ipynb

This file was deleted.

752 changes: 0 additions & 752 deletions examples/mro_hirise_isis_cmp.ipynb

This file was deleted.

902 changes: 902 additions & 0 deletions examples/usgscsm_isis_cmp.ipynb

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions knoten/vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ def point_info(cube_path, x, y, point_type, allow_outside=False):


def plot_diff(data, title='diff plot', colx='x', coly='y', coldx='diffx', coldy='diffy', colmag='magnitude', width=500, height=500):
import matplotlib.cm as cm
from matplotlib.colors import Normalize

fig = make_subplots(rows=2, cols=2, column_widths=[0.9, .1], row_width=[.9, .1],
shared_xaxes=True, shared_yaxes=True, horizontal_spacing = 0.01, vertical_spacing = 0.01)
Expand Down Expand Up @@ -175,7 +173,7 @@ def plot_diff(data, title='diff plot', colx='x', coly='y', coldx='diffx', coldy=
colorscale="viridis",
)), row=2, col=1)

xavg = data.groupby(colx).apply(np.mean)
xavg = data.groupby(colx).mean()
fig.add_trace(go.Scatter(x=xavg.index, y=xavg[colmag],
customdata=xavg,
name=f'{colx} mean error',
Expand All @@ -187,7 +185,7 @@ def plot_diff(data, title='diff plot', colx='x', coly='y', coldx='diffx', coldy=
colorscale="viridis",
)), row=1, col=1)

yavg = data.groupby(coly).apply(np.mean)
yavg = data.groupby(coly).mean()
fig.add_trace(go.Scatter(x=yavg[colmag],y=yavg.index,
customdata=yavg,
name=f'{coly} mean error',
Expand Down

0 comments on commit 459231a

Please sign in to comment.