diff --git a/docs/build/doctrees/nbsphinx/Examples/simple_environment.ipynb b/docs/build/doctrees/nbsphinx/Examples/simple_environment.ipynb index 1fae5723..ba58b512 100644 --- a/docs/build/doctrees/nbsphinx/Examples/simple_environment.ipynb +++ b/docs/build/doctrees/nbsphinx/Examples/simple_environment.ipynb @@ -19,10 +19,10 @@ "execution_count": 1, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:06.450195Z", - "iopub.status.busy": "2024-05-30T00:37:06.449993Z", - "iopub.status.idle": "2024-05-30T00:37:07.238610Z", - "shell.execute_reply": "2024-05-30T00:37:07.238206Z" + "iopub.execute_input": "2024-05-30T01:01:30.905387Z", + "iopub.status.busy": "2024-05-30T01:01:30.905253Z", + "iopub.status.idle": "2024-05-30T01:01:31.730454Z", + "shell.execute_reply": "2024-05-30T01:01:31.730039Z" } }, "outputs": [], @@ -55,10 +55,10 @@ "execution_count": 2, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.240495Z", - "iopub.status.busy": "2024-05-30T00:37:07.240356Z", - "iopub.status.idle": "2024-05-30T00:37:07.242475Z", - "shell.execute_reply": "2024-05-30T00:37:07.242241Z" + "iopub.execute_input": "2024-05-30T01:01:31.732661Z", + "iopub.status.busy": "2024-05-30T01:01:31.732456Z", + "iopub.status.idle": "2024-05-30T01:01:31.734674Z", + "shell.execute_reply": "2024-05-30T01:01:31.734390Z" } }, "outputs": [], @@ -92,10 +92,10 @@ "execution_count": 3, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.243838Z", - "iopub.status.busy": "2024-05-30T00:37:07.243742Z", - "iopub.status.idle": "2024-05-30T00:37:07.247521Z", - "shell.execute_reply": "2024-05-30T00:37:07.247252Z" + "iopub.execute_input": "2024-05-30T01:01:31.736181Z", + "iopub.status.busy": "2024-05-30T01:01:31.736077Z", + "iopub.status.idle": "2024-05-30T01:01:31.740467Z", + "shell.execute_reply": "2024-05-30T01:01:31.740080Z" } }, "outputs": [ @@ -172,10 +172,10 @@ "execution_count": 4, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.265370Z", - "iopub.status.busy": "2024-05-30T00:37:07.265163Z", - "iopub.status.idle": "2024-05-30T00:37:07.267840Z", - "shell.execute_reply": "2024-05-30T00:37:07.267563Z" + "iopub.execute_input": "2024-05-30T01:01:31.760182Z", + "iopub.status.busy": "2024-05-30T01:01:31.759995Z", + "iopub.status.idle": "2024-05-30T01:01:31.762910Z", + "shell.execute_reply": "2024-05-30T01:01:31.762602Z" } }, "outputs": [], @@ -212,10 +212,10 @@ "execution_count": 5, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.269364Z", - "iopub.status.busy": "2024-05-30T00:37:07.269257Z", - "iopub.status.idle": "2024-05-30T00:37:07.391117Z", - "shell.execute_reply": "2024-05-30T00:37:07.390792Z" + "iopub.execute_input": "2024-05-30T01:01:31.764461Z", + "iopub.status.busy": "2024-05-30T01:01:31.764354Z", + "iopub.status.idle": "2024-05-30T01:01:31.866923Z", + "shell.execute_reply": "2024-05-30T01:01:31.866591Z" } }, "outputs": [ @@ -223,28 +223,28 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,269 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mCalling env.reset() to get observation space\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:31,765 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mCalling env.reset() to get observation space\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,270 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=3109609464\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:31,765 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=3020782528\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,388 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:31,864 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,388 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:31,864 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" ] } ], @@ -262,7 +262,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Interacting with the Environment\n" + "## Interacting with the Environment\n", + "\n", + "First, the environment is reset." ] }, { @@ -270,10 +272,10 @@ "execution_count": 6, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.392805Z", - "iopub.status.busy": "2024-05-30T00:37:07.392599Z", - "iopub.status.idle": "2024-05-30T00:37:07.599945Z", - "shell.execute_reply": "2024-05-30T00:37:07.599671Z" + "iopub.execute_input": "2024-05-30T01:01:31.868586Z", + "iopub.status.busy": "2024-05-30T01:01:31.868458Z", + "iopub.status.idle": "2024-05-30T01:01:32.164001Z", + "shell.execute_reply": "2024-05-30T01:01:32.163684Z" } }, "outputs": [ @@ -281,21 +283,21 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,456 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:31,973 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[mResetting environment with seed=0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,598 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,161 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,598 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,162 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mEnvironment reset\u001b[0m\n" ] } ], @@ -303,15 +305,23 @@ "observation, info = env.reset(seed=0)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we take the scan action (`action=0`) a few times. This allows for the satellite to\n", + "settle in the pointing mode to satisfy imaging conditions." + ] + }, { "cell_type": "code", "execution_count": 7, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.601404Z", - "iopub.status.busy": "2024-05-30T00:37:07.601281Z", - "iopub.status.idle": "2024-05-30T00:37:07.620154Z", - "shell.execute_reply": "2024-05-30T00:37:07.619918Z" + "iopub.execute_input": "2024-05-30T01:01:32.165665Z", + "iopub.status.busy": "2024-05-30T01:01:32.165549Z", + "iopub.status.idle": "2024-05-30T01:01:32.185496Z", + "shell.execute_reply": "2024-05-30T01:01:32.185229Z" } }, "outputs": [ @@ -319,168 +329,168 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,601 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,166 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,602 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,166 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,602 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 60.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,166 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 60.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,602 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mRunning simulation at most to 600.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,167 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<0.00> \u001b[0m\u001b[mRunning simulation at most to 600.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,606 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 60.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,171 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 60.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,606 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mData reward: {'EO1_4947630384': 0.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,171 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mData reward: {'EO1_4423343632': 0.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,607 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,172 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,607 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,172 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,608 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,173 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,608 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,173 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,608 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 120.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,173 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 120.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,608 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mRunning simulation at most to 660.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,173 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<60.00> \u001b[0m\u001b[mRunning simulation at most to 660.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,612 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 120.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,177 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 120.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,612 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mData reward: {'EO1_4947630384': 20.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,177 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mData reward: {'EO1_4423343632': 20.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,613 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,178 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,613 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mStep reward: 20.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,178 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mStep reward: 20.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,613 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,178 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,613 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,178 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_nadir_scan tasked for 60.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,613 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 180.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,179 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 180.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,614 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mRunning simulation at most to 720.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,179 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<120.00> \u001b[0m\u001b[mRunning simulation at most to 720.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,617 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 180.0 for action_nadir_scan\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,182 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 180.0 for action_nadir_scan\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,617 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mData reward: {'EO1_4947630384': 60.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,183 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mData reward: {'EO1_4423343632': 60.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,618 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,183 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,618 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mStep reward: 60.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,184 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mStep reward: 60.0\u001b[0m\n" ] }, { @@ -499,15 +509,22 @@ "print(\" Final data level:\", observation[0])" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that the logs show little or no \n" + ] + }, { "cell_type": "code", "execution_count": 8, "metadata": { "execution": { - "iopub.execute_input": "2024-05-30T00:37:07.621613Z", - "iopub.status.busy": "2024-05-30T00:37:07.621499Z", - "iopub.status.idle": "2024-05-30T00:37:07.631653Z", - "shell.execute_reply": "2024-05-30T00:37:07.631434Z" + "iopub.execute_input": "2024-05-30T01:01:32.187143Z", + "iopub.status.busy": "2024-05-30T01:01:32.187022Z", + "iopub.status.idle": "2024-05-30T01:01:32.198412Z", + "shell.execute_reply": "2024-05-30T01:01:32.198144Z" } }, "outputs": [ @@ -515,61 +532,62 @@ "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,621 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,187 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[93;1m=== STARTING STEP ===\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,622 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 120.0 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,188 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[maction_charge tasked for 120.0 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,622 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 300.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,188 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[msetting timed terminal event at 300.0\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,622 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mRunning simulation at most to 780.00 seconds\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,188 \u001b[0m\u001b[msim.simulator \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<180.00> \u001b[0m\u001b[mRunning simulation at most to 780.00 seconds\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,629 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 300.0 for action_charge\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,195 \u001b[0m\u001b[36msats.satellite.EO1 \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[36mEO1: \u001b[0m\u001b[mtimed termination at 300.0 for action_charge\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,629 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mData reward: {'EO1_4947630384': 0.0}\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,196 \u001b[0m\u001b[mdata.base \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mData reward: {'EO1_4423343632': 0.0}\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,630 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4947630384']\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,196 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mSatellites requiring retasking: ['EO1_4423343632']\u001b[0m\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "\u001b[90;3m2024-05-29 17:37:07,630 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" + "\u001b[90;3m2024-05-29 18:01:32,197 \u001b[0m\u001b[mgym \u001b[0m\u001b[mINFO \u001b[0m\u001b[33m<300.00> \u001b[0m\u001b[mStep reward: 0.0\u001b[0m\n" ] } ], "source": [ - "observation, reward, terminated, truncated, info = env.step(action=1)" + "observation, reward, terminated, truncated, info = env.step(action=1)\n", + "diff = True" ] } ], diff --git a/docs/source/conf.py b/docs/source/conf.py index 28ab1406..b9103082 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -97,10 +97,13 @@ def has_all(qual_name): class PackageCrawler: - def __init__(self, base_source_dir, base_doc_dir, filter_all=True): + def __init__( + self, base_source_dir, base_doc_dir, filter_all=True, nb_cache_dir=None + ): self.base_source_dir = base_source_dir self.base_doc_dir = base_doc_dir self.filter_all = filter_all + self.nb_cache_dir = nb_cache_dir def grab_files(self, dir_path): dirs_in_dir = [x for x in dir_path.iterdir() if x.is_dir()] @@ -282,28 +285,25 @@ def run(self, source_dir=None): file, ) - nb_cache_dir = Path("../build/doctrees/nbsphinx") # relative to build for notebook in nb_paths: - nb_cache = nb_cache_dir / self.base_doc_dir / index_path / notebook.name + nb_cache = ( + self.nb_cache_dir / self.base_doc_dir / index_path / notebook.name + ) print() print(notebook) - print("cache at", nb_cache, nb_cache.is_file()) - print( - "diff", - diff_notebooks( - read_notebook(notebook, on_null="empty"), - read_notebook(nb_cache, on_null="empty"), - ), - ) + print("cache at", nb_cache.resolve(), nb_cache.is_file()) if ( - nb_cache.is_file() - and "'key': 'source'" - not in diff_notebooks( - read_notebook(notebook, on_null="empty"), - read_notebook(nb_cache, on_null="empty"), - ).__repr__() + self.nb_cache_dir is not None + and nb_cache.is_file() + and ( + "'key': 'source'" + not in diff_notebooks( + read_notebook(notebook.resolve(), on_null="empty"), + read_notebook(nb_cache.resolve(), on_null="empty"), + ).__repr__() + ) ): print("COPYING CACHE") shutil.copy( @@ -324,5 +324,13 @@ def run(self, source_dir=None): sys.path.append(os.path.abspath("../..")) -PackageCrawler(Path("../../src/bsk_rl/"), Path("./api_reference/")).run() -PackageCrawler(Path("../../examples"), Path("./examples/"), filter_all=False).run() +nb_cache_dir = Path("../build/doctrees/nbsphinx") +PackageCrawler( + Path("../../src/bsk_rl/"), Path("./api_reference/"), nb_cache_dir=nb_cache_dir +).run() +PackageCrawler( + Path("../../examples"), + Path("./examples/"), + filter_all=False, + nb_cache_dir=nb_cache_dir, +).run() diff --git a/examples/simple_environment.ipynb b/examples/simple_environment.ipynb index d58e6c3e..f90fef45 100644 --- a/examples/simple_environment.ipynb +++ b/examples/simple_environment.ipynb @@ -142,7 +142,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Interacting with the Environment\n" + "## Interacting with the Environment\n", + "\n", + "First, the environment is reset." ] }, { @@ -154,6 +156,14 @@ "observation, info = env.reset(seed=0)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Next, we take the scan action (`action=0`) a few times. This allows for the satellite to\n", + "settle in the pointing mode to satisfy imaging conditions." + ] + }, { "cell_type": "code", "execution_count": null, @@ -166,13 +176,21 @@ "print(\" Final data level:\", observation[0])" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Note that the logs show little or no \n" + ] + }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "observation, reward, terminated, truncated, info = env.step(action=1)" + "observation, reward, terminated, truncated, info = env.step(action=1)\n", + "diff = True" ] } ],