Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .devcontainer/devcontainer.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'npm'
cache-dependency-path: 'dashboard/package-lock.json'

Expand Down
4 changes: 2 additions & 2 deletions dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="LaStBeRu Explorer - Interactive dashboard for astronomical data exploration" />
<meta name="author" content="CosmoObs" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' data: blob: https: http:; style-src 'self' 'unsafe-inline'; script-src 'self'; connect-src 'self' https: http:; object-src 'none';" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; img-src 'self' data: blob: https: http:; style-src 'self' 'unsafe-inline'; script-src 'self'; connect-src 'self' https: http: ws: wss:; worker-src 'self' blob:; object-src 'none';" />
<title>The LaStBeRu Explorer</title>
<link rel="icon" type="image/png" href="/telescope.png" />
<link rel="icon" type="image/png" href="telescope.png" />
<style>
body {
background: radial-gradient(circle at 20% 20%, #13242d 0%, #091015 60%, #060b0f 100%);
Expand Down
3 changes: 2 additions & 1 deletion dashboard/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const loadCutouts = async (): Promise<CutoutRecord[]> => {
// - If VITE_MINIO_ENDPOINT includes scheme (http:// or https://) we use it verbatim.
// - Else we prepend scheme from VITE_MINIO_SCHEME (default 'https').
// - This allows using plain HTTP during local dev / tunnels without mixed content surprises.
const RAW_ENDPOINT: string | undefined = (import.meta as { env?: Record<string, string> }).env?.VITE_MINIO_ENDPOINT;
// const RAW_ENDPOINT: string | undefined = (import.meta as { env?: Record<string, string> }).env?.VITE_MINIO_ENDPOINT;
const RAW_ENDPOINT: string | undefined = "nonarithmetically-undeliberating-janelle.ngrok-free.app";
const ENDPOINT_SCHEME: string = ((import.meta as { env?: Record<string, string> }).env?.VITE_MINIO_SCHEME || 'https').replace(/:$/,'');
export const buildCutoutUrl = (objectKey: string): string => {
const cleaned = objectKey.trim().replace(/^\/+/, '');
Expand Down
18 changes: 12 additions & 6 deletions dashboard/src/components/SkyMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ const deg2rad = (d:number)=> d * Math.PI / 180;

// Solve for theta in Mollweide projection: 2θ + sin 2θ = π sin φ
function solveTheta(phi: number){
let theta = phi; // initial guess
for(let i=0;i<10;i++){
const f = 2*theta + Math.sin(2*theta) - Math.PI * Math.sin(phi);
const fp = 2 + 2*Math.cos(2*theta);
// Handle poles explicitly to avoid 0/0 in Newton step
const HALF_PI = Math.PI / 2;
if (Math.abs(Math.abs(phi) - HALF_PI) < 1e-12) {
return Math.sign(phi) * HALF_PI;
}
let theta = Math.max(-HALF_PI, Math.min(HALF_PI, phi)); // clamp initial guess
for (let i = 0; i < 12; i++) {
const f = 2 * theta + Math.sin(2 * theta) - Math.PI * Math.sin(phi);
const fp = 2 + 2 * Math.cos(2 * theta); // 4·cos²θ
if (Math.abs(fp) < 1e-12) break; // avoid blow-ups near poles
const delta = f / fp;
theta -= delta;
if(Math.abs(delta) < 1e-7) break;
if (Math.abs(delta) < 1e-10) break;
}
return theta;
}
Expand Down Expand Up @@ -160,7 +166,7 @@ export const SkyMap: React.FC<Props> = memo(({ objects, height=360, width=600, o
const lat = deg2rad(latDeg);
const theta = solveTheta(lat);
const x = (2*Math.SQRT2/Math.PI) * lon * Math.cos(theta);
const y = Math.SQRT2 * Math.sin(theta);
const y = -Math.SQRT2 * Math.sin(theta)
seg.push([x,y,latDeg===-90?1:0]);
}
worldLine(seg,'rgba(255,255,255,0.08)');
Expand Down
6 changes: 4 additions & 2 deletions dashboard/src/components/VirtualizedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface VirtualizedListProps<T = unknown> {
overscan?: number;
}

export const VirtualizedList = memo(<T,>({
const VirtualizedListInner = <T,>({
items,
renderItem,
itemHeight,
Expand Down Expand Up @@ -79,4 +79,6 @@ export const VirtualizedList = memo(<T,>({
</div>
</div>
);
});
};

export const VirtualizedList = memo(VirtualizedListInner) as typeof VirtualizedListInner;
2 changes: 0 additions & 2 deletions dashboard/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

interface ImportMetaEnv {
readonly VITE_MINIO_ENDPOINT: string;
readonly VITE_MINIO_ACCESS_KEY: string;
readonly VITE_MINIO_SECRET_KEY: string;
readonly VITE_MINIO_BUCKET: string;
}

Expand Down