From 4700869117beeed224a22cd65112f5fbded3b0ca Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 12 Jul 2024 11:29:36 -0400 Subject: [PATCH] strip filepath from filename entry in metadata * originally populated by lightkurve --- lcviz/parsers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lcviz/parsers.py b/lcviz/parsers.py index 06ea0ec..3a1cc3f 100644 --- a/lcviz/parsers.py +++ b/lcviz/parsers.py @@ -65,6 +65,9 @@ def light_curve_parser(app, file_obj, data_label=None, show_in_viewer=True, **kw light_curve['flux:orig_err'] = light_curve['flux_err'] light_curve.meta['FLUX_ORIGIN'] = 'flux:orig' + if 'FILENAME' in light_curve.meta: + light_curve.meta['FILENAME'] = os.path.basename(light_curve.meta['FILENAME']) + data = _data_with_reftime(app, light_curve) app.add_data(data, data_label)