Skip to content

Commit

Permalink
patch angle_optimizer to avoid CI crash on step5 test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilo9999 committed Jan 25, 2024
1 parent f4d808e commit fe6db3e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-B01_SL_load_single_file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ jobs:
run: python src/icesat2_tracks/analysis_db/B03_plot_spectra_ov.py SH_20190502_05180312 SH_testSLsinglefile2 True
- name: fourth step IOWAGA thredds
run: python src/icesat2_tracks/analysis_db/A02c_IOWAGA_thredds_prior.py SH_20190502_05180312 SH_testSLsinglefile2 True
- name: path minimize function to avoid crahs on CI
run: |
git apply angle_optimizer.patch -v
- name: Fifth step B04_angle
run: python src/icesat2_tracks/analysis_db/B04_angle.py SH_20190502_05180312 SH_testSLsinglefile2 True
13 changes: 13 additions & 0 deletions angle_optimizer.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py b/src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py
index fa167fc..014be17 100644
--- a/src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py
+++ b/src/icesat2_tracks/ICEsat2_SI_tools/angle_optimizer.py
@@ -208,7 +208,7 @@ class sample_with_mcmc:
fitting_args, fitting_kargs = self.fitting_args, self.fitting_kargs
self.fitter = self.LM.minimize(self.objective_func, self.params, method=method,
args=fitting_args, kws=fitting_kargs ,
- nwalkers=self.nwalkers, steps=steps, pos= self.seeds, **kargs)
+ nwalkers=self.nwalkers, steps=steps, pos= self.seeds,nan_policy='omit' , **kargs)
if verbose:
print(self.LM.report_fit(self.fitter))
print('results at self.fitter')

0 comments on commit fe6db3e

Please sign in to comment.