# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 00:44:41 2026

@author: scige
"""
#%%
import numpy as np
import matplotlib.pyplot as plt
from astropy.io import fits
from mpl_toolkits.mplot3d import Axes3D

# --- GENERAZIONE GAUSSIANA ---
N = 50  # Risoluzione griglia
x, y = np.meshgrid(np.linspace(0, 10, N), np.linspace(0, 10, N))

# Centrata in x=5, y=5 con deviazione standard sigma=1.5
x0, y0, sigma = 5, 5, 1.5
z = np.exp(-((x - x0)**2 + (y - y0)**2) / (2 * sigma**2))

# --- PLOT 3D PRIMA DEL SALVATAGGIO ---
fig = plt.figure(figsize=(10, 7))
ax = fig.add_subplot(111, projection='3d')
surf = ax.plot_surface(x, y, z, cmap='viridis', edgecolor='none')
ax.set_title("Superficie Gaussiana 3D (Anteprima)")
plt.colorbar(surf, ax=ax, shrink=0.5, aspect=5)
plt.show()
#%%
