Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial commit using functions to read BP+ XML files #16

Open
wants to merge 3 commits into
base: beta5
Choose a base branch
from

Conversation

doingnz
Copy link
Contributor

@doingnz doingnz commented Apr 18, 2024

Extract the code from bpp_Res2.m which reads the BP+ XML into functions, one for each the xml formats: 'CardioScope' and 'BPplus'. Comment out logic that truncated array data by removing leading NaN to maintain integrity of start of beat indexes.

This initial version runs with a sample CardioScope file and BPplus file. Limited checking of values being correct.

Note BP+ xml data includes 2 or 3 rhythm strips which by default are 10s duration.

ss : measured suprasystolic cuff rhythm (not in CardioScope xml, but included in BPplus xml)
ba : estimated intra-arterial brachial rhythm (ba shape is different to ss)
ao : estimated intra-arterial central aortic (in BPplus xml, these values prefixed with 'c' rather than 'ao')
The xml has average pulses for ss and ao rhythms, but not ba..

I think it becomes confusing to create an array ba_p_av from the ss rhythm data. Probably should be called ss_p_av.
I think ultimately ba_p_av should be reserved for average of ba_p_all if that is ever calculated.

Note the new BPplus xml has many values not previously available in CardioScope xml. Given it is easy for me to reprocess CardioScope to BPplus xml, it would be better to do that than spend lots of effort recalculating values that are incorrect or missing from the CardioScope xml.

selected beats data is always going to be missing from CardioScope data.
sBaseLined is also missing.
AIx (called cAIx)
AP (called cAP)
SEVR (called cSEVR)
Do you still have CardioScope devices in active use in studies?

How do you want to deal with values calculated by the matlab that are now also available from 'research' BP+ xml?

One suggestion might be to have the function that returns BP+ data return all the values under a device parent? Then device.ss.p_av would be the ss.p_av from BP+ and the repo could choose to calculate it's one ss.p_av?

Please try out this code and let me know if there are any questions or errors I should fix.

There are still TODO or FIXME comments that need attention. I wanted to get you an initial version as you are working on the code too.

extract code that reads BP+ xml files into inidividual functions.
fix alignmnet in comments. remove unused metadata.baTransitTime. add TODO for ao.map under CardioScope.
@adh30
Copy link
Owner

adh30 commented Apr 19, 2024

I think it becomes confusing to create an array ba_p_av from the ss rhythm data. Probably should be called ss_p_av.
I think ultimately ba_p_av should be reserved for average of ba_p_all if that is ever calculated.

  • this is fine by me. In part its a legacy from code to analyse Sphygmocor data and calculate PRV.

Note the new BPplus xml has many values not previously available in CardioScope xml. Given it is easy for me to reprocess CardioScope to BPplus xml, it would be better to do that than spend lots of effort recalculating values that are incorrect or missing from the CardioScope xml.

  • also fine. See below re use of Cardioscope.

selected beats data is always going to be missing from CardioScope data.
sBaseLined is also missing.

  • noted

Do you still have CardioScope devices in active use in studies?

  • I believe so. There is also the issue of legacy data.

How do you want to deal with values calculated by the matlab that are now also available from 'research' BP+ xml?

  • at present my thinking is to keep them in since it will avoid multiple processing. However I will think some more about this.

Please try out this code and let me know if there are any questions or errors I should fix.

There are still TODO or FIXME comments that need attention. I wanted to get you an initial version as you are working on the code too.

  • Thanks that's useful. I probably wont make much progress on this next week as I have to fix another bug in an analytical pipeline (amongst all the other things :-)).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants