Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Commit

Permalink
Update README and fix pixel plotter
Browse files Browse the repository at this point in the history
  • Loading branch information
ceholden committed Sep 14, 2015
1 parent 43c0787 commit c4dcee5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@ The simplest way of using YATSM would be the pixel-by-pixel command line interfa
We'll use the example [Landsat stack from Chiapas, Mexico](https://github.com/ceholden/landsat_stack) for this demonstration:

``` bash
> run_yatsm.py --consecutive=5 --threshold=3 --min_obs=16 \
... --freq=1 --min_rmse 100 --test_indices "2 4 5" --screening RLM \
... --plot_index=2 --plot_style xkcd \
... ../landsat_stack/p022r049/images/ 133 106
> yatsm pixel --band 2 --style xkcd examples/p022r049/p022r049.yaml 133 106
```

Produces:
Expand Down
14 changes: 6 additions & 8 deletions yatsm/cli/pixel.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def pixel(ctx, config, px, py, band, plot, ylim, style, cmap,
(cfg_key, kw, cfg[cfg_key][kw], value))
cfg[cfg_key][kw] = value
revalidate = True

if revalidate:
cfg = convert_config(cfg)

Expand Down Expand Up @@ -146,13 +146,11 @@ def pixel(ctx, config, px, py, band, plot, ylim, style, cmap,
plt.show()

# Eliminate config parameters not algorithm and fit model
yatsm = cfg['YATSM']['algorithm_cls'](
fit_indices,
design_info,
lm=cfg['YATSM']['prediction_object'],
px=px, py=py,
**cfg[cfg['YATSM']['algorithm']])
yatsm.fit(X, Y)
yatsm = cfg['YATSM']['algorithm_cls'](lm=cfg['YATSM']['prediction_object'],
**cfg[cfg['YATSM']['algorithm']])
yatsm.px = px
yatsm.py = py
yatsm.fit(X, Y, np.asarray(df['date'][valid]))

# Plot after predictions
with plt.xkcd() if style == 'xkcd' else mpl.style.context(style):
Expand Down

0 comments on commit c4dcee5

Please sign in to comment.