broadfield-dev commited on
Commit
80a7824
·
verified ·
1 Parent(s): cad05b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -111,7 +111,6 @@ def fetch_and_process_sdo_data(target_dt, forecast_horizon_minutes):
111
  if data_maps[t].get("hmi_bx"): data_maps[t][channel] = data_maps[t]["hmi_bx"]
112
  continue
113
 
114
- # *** FIX: Provide a valid time range for the Fido search query. ***
115
  time_attr = a.Time(t - datetime.timedelta(minutes=2), t + datetime.timedelta(minutes=2))
116
  instrument = a.Instrument.hmi if "hmi" in channel else a.Instrument.aia
117
  query = Fido.search(time_attr, instrument, physobs, sample, a.Time.nearest==True)
@@ -139,7 +138,8 @@ def fetch_and_process_sdo_data(target_dt, forecast_horizon_minutes):
139
  if exp_time is None or exp_time <= 0: exp_time = 1.0
140
  norm_data = reprojected_data / exp_time
141
 
142
- scaled_data = scaler.transform(.reshape(-1, 1), c_idx=i).reshape(norm_data.shape)
 
143
  channel_tensors.append(torch.from_numpy(scaled_data.astype(np.float32)))
144
  processed_tensors[t] = torch.stack(channel_tensors)
145
 
 
111
  if data_maps[t].get("hmi_bx"): data_maps[t][channel] = data_maps[t]["hmi_bx"]
112
  continue
113
 
 
114
  time_attr = a.Time(t - datetime.timedelta(minutes=2), t + datetime.timedelta(minutes=2))
115
  instrument = a.Instrument.hmi if "hmi" in channel else a.Instrument.aia
116
  query = Fido.search(time_attr, instrument, physobs, sample, a.Time.nearest==True)
 
138
  if exp_time is None or exp_time <= 0: exp_time = 1.0
139
  norm_data = reprojected_data / exp_time
140
 
141
+ # *** FIX: Corrected the syntax error on this line ***
142
+ scaled_data = scaler.transform(norm_data.reshape(-1, 1), c_idx=i).reshape(norm_data.shape)
143
  channel_tensors.append(torch.from_numpy(scaled_data.astype(np.float32)))
144
  processed_tensors[t] = torch.stack(channel_tensors)
145