We've updated our privacy policy.

Head Positions Hispanic Com. Study

3 posts
Was this reply useful? Learn more...
   
[-]
sarahfallmann +0 points · 9 months ago

I have a questions concerning the 'Hispanic Community Health Study / Study of Latinos' dataset

I found 7 different head positions in the polysomnography dataset. HPos is a computed signal derived from accelerometers. (So i suspected to get 3 head positions somehow correlated to supine, left and right lateral.)

I am not sure which head positions are meant by each value (-0.5,-0.4,-0.3,-0.2,-0.1,0,0.1)

Does anyone have an idea?

47 posts
bio
Was this reply useful? Learn more...
   
[-]
remomueller +0 points · 9 months ago

Hi Sarah,

The following script pulls both physical and digital values for the HPos signal from the first EDF on HCHS. It's not returning any values like those you indicated. My guess is that you are somehow transforming the values from the HPos signal? What language or tool are you using to process the EDFs?

# get_hpos_value.rb
require "rubygems"
require "edfize"

edf = Edfize::Edf.new("hchs-sol-00011596.edf")

edf.load_signals

signal = edf.signals.find { |s| s.label == "HPos" }
puts "Signal"
puts "  Label                   : #{signal.label}"
puts "  Unique Physical Values  : #{(signal.physical_values.uniq.sort).inspect}"
puts "  Unique Digital Values   : #{(signal.digital_values.uniq.sort).inspect}\n\n"

Output of ruby get_hpos_value.rb

Signal
  Label                   : HPos
  Unique Physical Values  : [0.0, 1.0, 2.0, 3.0, 4.0, 6.0]
  Unique Digital Values   : [0, 1, 2, 3, 4, 6]

From @mrueschman, these values correspond to:

1 = S (Supine)
2 = LL (Lateral Left)
3 = LR (Lateral Right)
4 = PL (Prone Left)
5 = PR (Prone Right)
6 = U (Upright)

The first value 0 is most likely is the initialization value.

Edit: It seems like you may be doing the following somewhere in your code: (signal_value / 10 - 0.5)

5 posts
Was this reply useful? Learn more...
   
[-]
stephaniemarvin +0 points · 9 months ago

Hi Sarah,

I compared your values/amounts to the values/amounts in the software. While I agree with Remo Mueller that I am not seeing the same negative HPos values, my duration amounts are equivalent to your calculations. I would agree that you can ignore the -0.5 value. It appears that the studies start with a “?” annotation that occurs for 1 second, so disregard. In regard to the values:

S (Supine) = -0.4 LL (Lateral Left) = -0.3 LR (Lateral Right) = -0.2 PL(Prone Left) = -0.1 PR(Prone Right) = 0 U (Upright) = 0.1

3 posts
Was this reply useful? Learn more...
   
[-]
sarahfallmann +0 points · 9 months ago

Hi,

Thank you very much for your help.

I used Matlab to read the EDFs and something went apparently wrong, with how the values are read.

I also got an email reply from NSRR who helped figure out to translate the positions to my values :)

S (Supine) = -0.4 LL (Lateral Left) = -0.3 LR (Lateral Right) = -0.2 PL(Prone Left) = -0.1 PR(Prone Right) = 0 U (Upright) = 0.1

3 posts
Was this reply useful? Learn more...
   
[-]
sarahfallmann +0 points · 9 months ago

Hi everyone,

Sorry I am a bit worried about the values being wrong when using blockEdfLoad.m in NSRR Cross Cohort EDF Viewer (link: https://github.com/nsrr/edf-viewer), as this may also go wrong then for other parameters.

I use this Matlab code:

clear variables; close all force; clc;

[header, signalHeader, signalCell] = blockEdfLoad('hchs-sol-00011596.edf');

hpos_index = 6;
fprintf("Signal header:\n");
display(signalHeader(hpos_index));

hpos = signalCell{hpos_index};
fprintf("Signal min:");
display(min(hpos));
fprintf("Signal max:");
display(max(hpos));
fprintf("Signal unique values:\n");
display(unique(hpos));

And get the following Output: Signal header: signal_labels: 'HPos' tranducer_type: 'ARES Insight Computed Signal' physical_dimension: '' physical_min: 0 physical_max: 10 digital_min: 0 digital_max: 10 prefiltering: '' samples_in_record: 1 reserve_2: ''

Signal min: -0.5000

Signal max: 0.1000

Signal unique values: -0.5000 -0.4000 -0.3000 -0.2000 -0.1000 0.1000

Can you may help me with finding out where something goes wrong?

EDIT: It seems blockEdfLoad transforms the data in a way and that using a generic reader such as, link https://uk.mathworks.com/matlabcentral/fileexchange/31900-edfread?focused=6839186&tab=function, does give the expected values 1-6

47 posts
bio
Was this reply useful? Learn more...
   
[-]
remomueller +0 points · 9 months ago

Hi Sarah,

I'll reach out to the team that released the code so they can take a look at it. The original BlockEDFLoad was created by Dennis Dean, one of our former members, and the code is available here: https://github.com/DennisDean/BlockEdfLoad/blob/master/blockEdfLoad.m

It looks like this version is slightly newer: v0.1.22 vs v0.1.0

8 posts
Was this reply useful? Learn more...
   
[-]
SaraMariani +0 points · 9 months ago

Hello Sarah, I ran your same code using the function blockEdfLoad.m from here: https://github.com/DennisDean/BlockEdfLoad/blob/master/blockEdfLoad.m and I obtain:

Signal header: signal_labels: 'HPos' tranducer_type: 'ARES Insight Computed Signal' physical_dimension: '' physical_min: 0 physical_max: 10 digital_min: 0 digital_max: 10 prefiltering: '' samples_in_record: 1 reserve_2: ''

Signal min: 0

Signal max: 6

Signal unique values: 0 1 2 3 4 6

I believe the function you used, (link: https://github.com/nsrr/edf-viewer) is an older version. Thank you for identifying the bug! We will make sure we update it. Please let us know if you find any further problems. Best, Sara

Topic is locked. Start a new topic