Cleanup: remove wreck code from scripts/sp2xr_apply_calibration.py
This commit is contained in:
@@ -122,36 +122,3 @@ def main():
|
||||
if __name__ == "__main__":
|
||||
start_time = time.time()
|
||||
main()
|
||||
|
||||
"""
|
||||
def main():
|
||||
args = parse_args()
|
||||
output_dir = Path(args.output)
|
||||
|
||||
# Load dataset
|
||||
df = dd.read_parquet(args.input, engine="pyarrow")
|
||||
|
||||
# Load calibration config
|
||||
with open(args.config, "r") as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
# Apply calibration
|
||||
calibrated_df = calibrate_particle_data(df, config)
|
||||
calibrated_df["date"] = df.index.dt.date.astype("date64[pyarrow]")
|
||||
calibrated_df["hour"] = df.index.dt.hour.astype("i8")
|
||||
|
||||
# Save output
|
||||
calibrated_df.to_parquet(
|
||||
path=output_dir,
|
||||
engine="pyarrow",
|
||||
partition_on=["date", "hour"],
|
||||
coerce_timestamps="us",
|
||||
allow_truncated_timestamps=True,
|
||||
write_index=True,
|
||||
append=False,
|
||||
)
|
||||
print("✅ Calibration applied successfully!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user