Commit 45c7a1bc5d5ba9ca4b4499c799fa6d49fd617e31
1 parent
b61a6850
change default source model
Showing
1 changed file
with
6 additions
and
6 deletions
inst/lat/test/test_python.py
| @@ -45,8 +45,7 @@ def analyse_unbinned(xmlname): | @@ -45,8 +45,7 @@ def analyse_unbinned(xmlname): | ||
| 45 | 45 | ||
| 46 | # Perform optimization | 46 | # Perform optimization |
| 47 | opt = GOptimizerLM() | 47 | opt = GOptimizerLM() |
| 48 | - opt.max_iter(1000) | ||
| 49 | - #obs.optimize(opt) | 48 | + obs.optimize(opt) |
| 50 | print obs | 49 | print obs |
| 51 | 50 | ||
| 52 | 51 | ||
| @@ -75,10 +74,11 @@ def analyse_binned(xmlname): | @@ -75,10 +74,11 @@ def analyse_binned(xmlname): | ||
| 75 | log = GLog() | 74 | log = GLog() |
| 76 | log.cout(True) | 75 | log.cout(True) |
| 77 | opt = GOptimizerLM(log) | 76 | opt = GOptimizerLM(log) |
| 78 | - opt.max_iter(1000) | 77 | + #opt.lambda_inc(10.0) |
| 78 | + #opt.lambda_dec(0.1) | ||
| 79 | obs.optimize(opt) | 79 | obs.optimize(opt) |
| 80 | - print opt | ||
| 81 | print obs | 80 | print obs |
| 81 | + print opt | ||
| 82 | 82 | ||
| 83 | # Plot residuals | 83 | # Plot residuals |
| 84 | plot_residuals(obs) | 84 | plot_residuals(obs) |
| @@ -168,8 +168,8 @@ if __name__ == '__main__': | @@ -168,8 +168,8 @@ if __name__ == '__main__': | ||
| 168 | 168 | ||
| 169 | # Analyse data | 169 | # Analyse data |
| 170 | #analyse_unbinned("data/source_model.xml") | 170 | #analyse_unbinned("data/source_model.xml") |
| 171 | - #analyse_binned("data/source_model.xml") # Original | ||
| 172 | - analyse_binned("data/source_model2.xml") # Powerlaw for extragal. diffuse | 171 | + analyse_binned("data/source_model.xml") # Original |
| 172 | + #analyse_binned("data/source_model2.xml") # Powerlaw for extragal. diffuse | ||
| 173 | #analyse_binned("data/source_model3.xml") # No Crab, Powerlaw for extragal. diffuse | 173 | #analyse_binned("data/source_model3.xml") # No Crab, Powerlaw for extragal. diffuse |
| 174 | #analyse_binned("data/source_model4.xml") # No Crab, no extragal. diffuse | 174 | #analyse_binned("data/source_model4.xml") # No Crab, no extragal. diffuse |
| 175 | #analyse_binned("data/source_model5.xml") # No Crab, no galactic diffuse | 175 | #analyse_binned("data/source_model5.xml") # No Crab, no galactic diffuse |