OrbitSense: add the explorer to your existing Flask website
=========================================================

Intended page: https://www.arminnabaei.com/orbitsense.html

The package is prepared for deployment. That address is not reported as live
until you deploy it on your website and verify access.

1. Copy the files
-----------------
Open your existing mysite project in PyCharm.

Replace the empty templates/orbitsense.html shown in your screenshot with the
complete templates/orbitsense.html in this package.

Copy the entire static/orbitsense folder into your project's static folder.
Keep the folder structure. The page needs its JavaScript, CSS, measured JSON,
previews, map library, demonstration, and supporting downloads.

2. Add one Flask route
---------------------
Open your real flaskApp.py, without a ._ prefix. Copy the complete function
from flask_route_to_add.py below your existing motion_page() function and
before the final if __name__ == "__main__": block.

Your supplied application already imports render_template. Do not create
another Flask app object and do not replace your existing routes.

3. Test locally
---------------
Start your existing application as usual, then open:
http://127.0.0.1:8000/orbitsense.html

Use the actual port shown by your application if it differs from 8000.

Your website already has Flask. The addition needs no new Python packages.
For an optional preview without the portfolio's ML dependencies, use a separate
virtual environment in this extracted package:

    python -m venv .venv-preview
    source .venv-preview/bin/activate
    python -m pip install -r requirements-preview.txt
    python run_preview.py

Open http://127.0.0.1:8000/orbitsense.html

Check both reference tabs, the sliders, controls toggle, map markers,
candidate selection, CSV/JSON exports, demonstration, and supporting links.
Open this page through Flask, not by double-clicking the HTML file.

The map uses public OpenStreetMap tiles. Tiles need internet access. If they
are unavailable, the site coordinates, measured rankings, previews, and
exports remain available. Attribution and the bundled Leaflet licence are
included.

4. Publish with your existing workflow
-------------------------------------
Commit the new template, static/orbitsense folder, and route change through
GitHub Desktop. Push to the repository used by your existing website.
Deploy or restart your existing Flask hosting service. A GitHub push only
deploys automatically if your host is already configured to do that.

No DNS change is needed for /orbitsense.html. GitHub stores the source; this
Flask application must run on a host that supports Python, not GitHub Pages.
Use the host's production WSGI configuration, not Flask's development server.

Before publishing, replace the hardcoded session secret from the supplied
application with a new random secret provided through the hosting environment.
Keep secrets out of Git. Disable debug mode for production. This addition
does not contain or copy your application's existing secret.

5. Public addresses after deployment
------------------------------------
Application:
https://www.arminnabaei.com/orbitsense.html

Demonstration page and 25-second video:
https://www.arminnabaei.com/static/orbitsense/demo.html
https://www.arminnabaei.com/static/orbitsense/demo.mp4

Submission fields:
https://www.arminnabaei.com/static/orbitsense/submission.html

Methodology and downloads:
https://www.arminnabaei.com/static/orbitsense/methodology.html
https://www.arminnabaei.com/static/orbitsense/downloads.html

These are the intended addresses. Confirm every link publicly after deployment
before pasting it into the submission portal. Creating this package does not
submit the project to NASA.

6. Data and reproducibility
--------------------------
This addition reuses the published release's measured features, tolerances,
evaluation results, elevation previews, and scoring formula. It contains 13
Earth windows and two planetary reference windows. It does not add invented
locations or recompute the geospatial analysis during page requests.

Nominal analysis: 25.6 km windows and an 800 m grid. The release provides a
fixed catalogue, not a systematic worldwide search. Moon matches are weak;
the relief-only baseline has the same top three as the weighted method.
Keep the limitations and measured evaluation with the results.

The reproduce folder contains the original preprocessing and evaluation code,
data manifests, measured JSON, and numerical tests. For native raster inputs,
extract source.zip and both static/orbitsense/crops-1.zip and crops-2.zip into
the same folder. They populate orbitsense/reproduce/data/crops. From the
orbitsense/reproduce folder, install requirements.txt and run:

    python -m processing.preprocess
    python -m processing.evaluation

Full acquisition, resampling, and score
details are in static/orbitsense/docs/methodology.md.

Code integration checks are in tests/. Their results are saved separately from
the original measured scientific evaluation.
