diff --git a/CHANGES.rst b/CHANGES.rst index 546fd83..4eab1a1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,8 @@ * Fixes CDIPS support by handling columns filled with strings with empty units. [#122] +* Removes filepath from FILENAME entry in metadata. [#124] + 0.4.0 (06-11-2024) ------------------ 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)