ImperialCollegeLondon / ImperialCollegeLondon/MAG-Data-Visualization

Multiple HK files in the same folder

Open
#267 0 comments 0 reactions 2 assignees Claimed by @debdut-sengupta View on GitHub
bug
Dominant language
MATLAB
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Description

If multiple Science and HK files are present in the folder to be analyzed, the science data is plotted correctly, but the HK data is not. This may be because support has not been added for multiple HK files yet. This means that:
* The science field plot throws the following warning:
`Warning: Failed to visualize "mag.hs.view.Field" because of error "MATLAB:plot:InvalidSecondInput": Invalid data argument.`
* The temperature plot on the science field plot is empty with incorrect axes measurements
* For the other HK plots, only the first data series is plotted

This behaviour was seen in the HelioSwarm part of the app but the same behaviour will likely be observed when analyzing data from other missions.

## To Reproduce

Perform the following with the HelioSwarm part of the app (the behaviour might be reproducible with other missions as well):
1. Insert two science CSVs and two HK CSVs in the same folder. An example dataset which can be used is HS-MAG-PR-ICL-017R76.
2. Select this folder as the location and press 'Process Data'.
3. On the Visualize tab, press 'Show Figures' on the Field tab. At this point, the temperature plot is empty, the axes are flipped, and the following warning is shown:
`Warning: Failed to visualize "mag.hs.view.Field" because of error "MATLAB:plot:InvalidSecondInput": Invalid data argument.`
5. On the HK tab, select xyz_intg_sat and press 'Show Figures'. The y axis does not plot the whole time series of the two CSVs.

## Location of Warning
The warning traces back to line 54 in C:\Users\ds2021\git_repositories\MAG-Data-Visualization\src\visualize\+mag\+graphics\+chart\Plot.m

At this location, xData{1} is a Nx1 datetime array, while yData{1} is a 2x2 cell array

## Additional Information

Versions tested: v9.2.0, v9.3.0
Bug likely in all versions of the repo.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.