Commit bb33af38 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Merge branch 'issue-818' into 'develop'

Issue 818

Closes #818

See merge request !198
parents a5a57b2b 32b56615
Pipeline #1341 passed with stages
in 24 minutes and 18 seconds
......@@ -21,6 +21,9 @@
</properties>
<body>
<release version="11.0" date="TBD" description="TBD">
<action dev="bryan" type="fix" issue="818">
Use observed solar flux instead of adjusted in DTM2000 model.
</action>
<action dev="evan" type="fix" issue="798">
Allow DSST event detection when propagating backwards.
</action>
......
......@@ -193,29 +193,17 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
return previousValue * previousWeight + nextValue * nextWeight;
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getInstantFlux(final AbsoluteDate date) {
// Interpolating two neighboring daily fluxes
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getF107Adj(), nextParam.getF107Adj());
return getLinearInterpolation(date, previousParam.getF107Obs(), nextParam.getF107Obs());
}
/** {@inheritDoc}
* For the DTM2000 model, we are using the adjusted flux
*/
/** {@inheritDoc} */
public double getMeanFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
return previousParam.getCtr81Adj();
} else {
// Only monthly data is available, better interpolate between two months
// get the neighboring dates
bracketDate(date);
return getLinearInterpolation(date, previousParam.getCtr81Adj(), nextParam.getCtr81Adj());
}
return getAverageFlux(date);
}
/** {@inheritDoc} */
......@@ -266,10 +254,9 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
/**
* Gets the daily flux on the current day.
* For the NRLMSISE00 model, we are using the observed flux
*
* @param date the current date
* @return the daily F10.7 flux (adjusted)
* @return the daily F10.7 flux (observed)
*/
private double getDailyFluxOnDay(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
......@@ -284,9 +271,7 @@ public class CssiSpaceWeatherData extends AbstractSelfFeedingLoader
}
}
/** {@inheritDoc}
* For the NRLMSISE00 model, we are using the observed flux
*/
/** {@inheritDoc} */
public double getAverageFlux(final AbsoluteDate date) {
if (date.compareTo(lastDailyPredictedDate) <= 0) {
bracketDate(date);
......
......@@ -206,7 +206,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2000, 1, 1, 0, 0, 0.0, utc);
final double meanFlux = cswl.getMeanFlux(date);
assertThat(meanFlux, closeTo(158.6, 1e-10));
assertThat(meanFlux, closeTo(165.6, 1e-10));
}
@Test
......@@ -214,7 +214,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2034, 6, 16, 0, 0, 0.0, utc);
final double meanFlux = cswl.getMeanFlux(date);
assertThat(meanFlux, closeTo((134.8 + 138.8) / 2, 1e-3));
assertThat(meanFlux, closeTo((132.1 + 134.9) / 2, 1e-3));
}
@Test
......@@ -238,7 +238,7 @@ public class CssiSpaceWeatherLoaderTest {
CssiSpaceWeatherData cswl = loadCswl();
AbsoluteDate date = new AbsoluteDate(2000, 1, 1, 12, 0, 0.0, utc);
final double instantFlux = cswl.getInstantFlux(date);
assertThat(instantFlux, closeTo((125.6 + 128.5) / 2, 1e-10));
assertThat(instantFlux, closeTo((129.9 + 132.9) / 2, 1e-10));
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment