System fundamentals

Welcome to Hypnodyne Z-Max, the most advanced and simple to use EEG Home Sleep Monitor.

Please note: the product is actively being developed. If you notice any discrepancy between the screen-shots in this help file and the latest version of our software, please do not panic. You can always write us for support

info@hypnodynecorp.com

www.hypnodynecorp.com


Quick-start guide

 Top Previous Next

This guide will get you started acquiring, viewing and optionally saving data from ZMax.

Make sure the battery is at least partially charged

First, please make sure that the ZMax battery is at least partially charged. You may do so by connecting ZMax to any USB host port (for instance, the USB port on your PC). When the ZMax battery is fully charged, the white LED indicator on the device will switch off. You do not need a full charge to try out the steps in this guide. Just 10 minutes of charging will be sufficient.

Locate the necessary components

Please locate the following components. You will need all of the following to complete this tutorial:

· The ZMax USB receiver

· The ZMax head-worn transmitter

· One forehead electrode patch

Insert the USB receiver

Plug the ZMax USB receiver into a USB port on your PC. Please note wireless transmission quality is highly dependent on the distance between the transmitter and the receiver. You must have a clear line of sight between the transmitter and the receiver. If you are using a desktop PC that only has USB ports at the back, you can use a USB extension cable. The USB receiver does not need a special driver.

Start HDServer and HDRecorder, easy method

The QuickStart tool can help you start HDServer and HDRecorder with just one click.

Just click on QuickStart. If a firewall prompt is displayed, make sure to click "Allow" on both private and public networks.

Start HDServer and HDRecorder, more advanced method

If you want to learn to start everything manually instead of using QuickStart, follow this section instead.

First, please run the server GUI program (HDServiceGUI.exe).

You do not need to change the default settings. Simply click "Start server".

Windows Firewall will prompt you to allow the server to communicate with the internet. You do not need to allow communication with the outside world in order to complete this tutorial. However, it's convenient to click "allow" now, because Windows will not prompt you again, and the next time you will have to manually add a rule in Windows Firewall (or move the software to a different folder, then Windows Firewall will prompt again).

With the server running, please start the recording application (HDRecorder.exe).

The recorder should detect the presence of the server. Clicking the Connect button begins a recording session.

If the server was not found, the connect button is grayed out and cannot be clicked. Please ensure that you have started the server and consult the trouble-shooting section.

The signal viewer window

Upon connecting, HDRecorder will close the connectivity panel and the signal viewer will be displayed instead.

Switch on the transmitter

If you haven't already done so, please disconnect ZMax from the PC and switch it on using the ON/OFF button.

The viewer should begin to display data.

Mount an electrode patch

Mount an electrode patch on the transmitter. The four male snap buttons on the electrode patch must be pressed against the four female snap receptacles on the back of the transmitter.

All four snaps need to be firmly pressed into the receiver to ensure good contact.

Wear the transmitter

Fasten the transmitter around your head using the velcro headband. The transmitter should be slightly above your eyebrows, and the arms should extend around your forehead to acquire signal from your temples. Please make sure that hair is not trapped under the gel below the electrode patch. If the patch is too long, you may fold it as needed.

Shortly after wearing the transmitter, the EEG signal (in blue) will stabilize, and the PPG (in red) will begin to display a stable waveform.

Please move your eyes left and right to produce the characteristic anti-correlated EOG waveform shown below in blue, on the left.

Then, clench your teeth to produce the characteristic EMG high frequency noise, also shown below in blue but on the right side.

If only one of the EEG channels seems to move, please verify proper connection between the electrode patch and the transmitter. Then, verify that all the gel areas below the electrode patch are making good contact with the skin. Then allow a few seconds for the signal to stabilize.

That's it!

You are now acquiring data in real time using ZMax.


Recording without a PC

ZMax can record sleep data to a memory card instead of streaming data wirelessly.

Under normal circumstances memory card storage is initiated remotely using the HDRecorder software, after the operator verifies proper electrode connection and signal acquisition. With ZMax this verification can easily happen through the internet.

However, there are cases in which it is more convenient to dispense with remote monitoring altogether and simply record data.

A patient can borrow ZMax from a researcher or clinician, record one or more nights of data at home, and return the device. The clinician can then retrieve the stored data from the memory card. Alternatively, the patient can record data at home and send sleep data files to the clinician through the internet. For example, the patient may acquire the first night, then submit the file to the clinician for a confirmation of proper electrode contact. Then, the patient can record more nights, and so on.

Because ZMax is so easy to apply and use, after the patient becomes familiar with the device there is little need for any external supervision.

To store data on the internal memory card without previewing the signal wirelessly, simply follow these steps.

· Turn on ZMax using the ON/OFF switch.
· Press the middle button

ZMax will emit a brief confirmation chirp and begin recording data.

To terminate the recording, first turn off ZMax using the ON/OFF switch. After ZMax finalizes the file it will again emit a brief chirp. It is then possible to remove the memory card.

* do not remove the memory card before switching off the device or your data file may be corrupted.


Tips for obtaining a good recording

The quality of data obtained with ZMax is entirely dependent on how well the sensors are placed on the body. Fortunately, ZMax is the easiest to utilize in-home EEG tool. A few tips will go a long way towards obtaining solid sleep data for analysis:

· Try to stay away from power lines. As with all EEG equipment, the power line AC frequency (50 or 60 Hz) can be picked up and become part of the EEG signal. Because ZMax acquires the signal directly on the patient's forehead this problem is very limited (as in active electrode EEG systems). However, when viewing a real-time unfiltered signal, perhaps to verify EEG signal quality, you may want to avoid touching the computer. In case of laptops, you can drastically reduce this effect by disconnecting the power source and moving the power cable away. Please note that power lines have more effect on the ZMax EEG signal when the external nasal sensor is used (as is common with any wiring in all EEG systems). Fortunately, power line interference can be filtered out with absolutely no signal degradation. However, note that when using wireless mode, if radio link quality is poor and many packets are lost, the combined effect of packet loss and high frequency line noise can create broad spectrum contamination - this will degrade the spectrogram and may terribly confuse any frequency based signal analysis algorithms.
· PPG data can be affected by room illumination. Although room lighting appears as a constant light source to us, in reality it is flickering faster than we can perceive. In case of light skinned patients and particularly when using the Hypnodyne nasal sensor, this external light may be transmitted through the skin and affect the PPG reading. This is not a big problem when using the PPG signal to determine the heart rate. However, the nasal sensor relies on precise measurements to calculate the SpO2 blood oxygenation value, so even though the final PPG waves are filtered, the high frequency component can affect the red to infrared ratios on which SpO2 is calculated. The degree to which room illumination is affecting the signal can be verified by switching off "Filter display" in HDRecorder. When accurate PPG data is desired, please switch off room lighting if possible.

· When the headband is too loose, night-time movements will cause electrode disconnection. When this occurs, segments of the resulting EEG signal will be blank (flat line). This situation is easily determined by a remote operator when observing the signal with HDRecorder. Furthermore, HDRecorder has an automatic warning mechanism which raises an alert when the signal flat-lines.
· When the headband is too tight, in some sleeping positions the forehead will begin to pulse strongly at the heart rate frequency and the EEG signal will show heart rate contamination. Such contamination will make scoring difficult as its frequency overlaps the delta wave frequency range. HDRecorder has an automatic warning mechanism which raises an alert when a strong heart rate artifact is detected on the EEG signal. This warning can only be displayed when ZMax is acquiring in wireless mode. To avoid false positives, the alert is raised only when the heart rate interference is relatively pronounced.
· When data is streamed wirelessly the most important point of caution is the radio link quality. Due to the proximity of the ZMax transmitter to the head of the patient, and limitations in power consumption which result from the small size of the device, the transmit power is limited. The ZMax system requires that the USB receiver be placed in close proximity to the transmitter. Please read the radio link strength section for more information.


Radio link strength

ZMax can transmit data wirelessly, thereby avoiding the annoying cabling that have long characterized polysomnography studies. However, ZMax is not a long range transmitter.

The ZMax radio output power is limited by:

· Safety precautions due to its prolonged usage in close proximity to the patient's head.
· Power consumption, due to the miniaturization of the transmitter (and, hence, the battery).

ZMax expects the USB receiver to be in close proximity to the transmitter (1-2 meters). You will most likely not be able to acquire signal from another room through a concrete wall.

Furthermore, the fact that ZMax is attached to a patient's forehead poses a unique problem compared to most radio frequency electronic devices. The head is composed of mostly water, which attenuates radio signals. For this reason, towards the limits of the signal range it is possible for the link quality to be good when the patient is facing directly towards the receiver, and very poor or even zero when facing away. The most problematic position for radio transmission is when the user's forehead points away from the receiver, downwards, and when one of the patient's arms further shields the transmitter due to the sleeping position.

There is also the issue of reflection and refraction of radio waves, common to all high frequency transmitters located in small spaces. Inside small spaces radio waves create a complex 3D arrangement of positive and negative interference (like waves in a pond). When the signal strength is low, packet reception becomes sensitive to the exact position and orientation of the transmitter. A blind spot may be just 1cm or 10 degrees away from a spot that allows perfect radio reception.

The simple way to avoid any link quality issues is to place the receiver not more than 2 meters away from the patient, preferably behind the patient's head or even under the bed.

When this is not possible, you may find the following tips useful:

· Prior to recording an important night, have the patient assume different positions to test whether the location of the receiver is suitable. In particular, the patient should try to assume a worst-case position, with the device pointing downwards towards the mattress and away from the receiver, and an arm very near or covering the device. When the worst case position does not yield significant problems in signal reception you can assume that the radio link will be stable throughout the night.
· Use a USB extender cable to position the USB receiver away from surrounding objects. This is strongly advised when using a PC that has USB ports only at the back or very close to the metallic frame of the computer, or when the receiver is kept more than 1-2 meters away from the patient, or when objects occlude the line of sight path. If you must record through a wall (for instance in a sleep lab) you may run the extender cable through an aperture in the wall, or place the server PC inside the patient's room (please see the data link topology section).
· When laying out a monitoring space, it is advisable for the monitoring station (and therefore the USB receiver) to be placed along a line behind the user's head. When the receiver is placed behind the user's head, the signal strength varies little when the sleeping position changes left to right. But when the USB receiver is on one side of the bed, the link quality can change substantially depending on the sleeping position.

Note: the EEG is the highest frequency signal acquired by ZMax. The ZMax radio protocol is optimized to ensure EEG integrity. This is accomplished by transmitting the last N packets at every time interval (256 times a second). Practically, this means that when the radio link begins to decay, you may obtain a perfectly good EEG signal, but begin to lose PPG resolution. This is an ideal compromise in most situations since PPG information is highly redundant.


Data link topology

When transmitting data wirelessly, or when previewing data wirelessly prior to a memory card storage session, the signal acquired by the ZMax head-worn transmitter is first sent over the air and received by the USB receiver. Data from the USB receiver is parsed by the server software (HDServer.exe or the user friendly interface HDServiceGUI.exe) and offered for consumption to any TCP clients.

Wireless signal range from the head-worn transmitter to the receiver is limited; however once data has been accepted wirelessly by a PC or mobile device running the Hypnodyne server, it can be viewed and saved from any client connected to the server through the LAN or internet.


Lending ZMax to a patient

A patient can borrow ZMax and autonomously or semi-autonomously record one or more nights of sleep data.

ZMax offers three options to support this type of scenario:

Case 1. A remote operator or clinician monitors the signal remotely throughout the whole night.

This is the most labor intensive option for a clinician. The clinician must set up an appointment with the patient, or remain on call until the patient decides to go to sleep Then, the clinician must continue to monitor the signal until the patient wakes up in the morning. The main advantage is that any night-time problem with the recording (such as electrode disconnection or excessive sweating) can be handled in real time. The main disadvantage is that the patient must run the server in his or her home. Additionally, wireless link quality issues are not easily resolved by the patient autonomously unless he is able to simply place the receiver close to the bed.

Case 2. A remote operator or clinician checks proper signal acquisition remotely, then starts memory card storage and leaves.

This is a less labor intensive option. The clinician must still set up an appointment with the patient, or remain on call until the patient decides to go to sleep. However, once memory card storage is initiated, no further remote interaction is necessary (or possible). The main disadvantage is that the patient must run the server in his or her home. Wireless link quality issues are not easily resolved by the patient autonomously, but are irrelevant once memory card recording begins.

Case 3. No remote operator, patient initiates memory card storage without supervision

This is the most convenient option for the clinician. The patient is completely autonomous and no wireless link quality problems can arise. However, with no remote monitoring, signal integrity can only be verified when the data file is received by the clinician (that is, when the patient uploads it the next day, or when the memory card is retrieved).

Because ZMax is very simple to use, most patients can just apply it to their forehead with an electrode patch connected, start memory card storage and go to sleep. A common issue with first time users occurs when the electrodes become displaced throughout the night, perhaps during arousals. This is always a problem with headband tightness (which should, however, not be excessive to prevent heart rate contamination of the EEG signal due to pulsations of forehead blood vessels). If the issue arises, the patient can be instructed to resolve issues with electrode disconnections. Once this problem is handled there is often no need for remote monitoring or assistance.

How a patient can run a Hypnodyne server in his home

If a patient can run a Hypnodyne server in the home, the remote clinician can easily make a "network call" to the user's PC to acquire sleep data. To achieve this, the patient must be running the Hypnodyne server software on a Windows PC or Android mobile. The patient must also have the ZMax USB receiver plugged into the same device.

The Hypnodyne server is a simple Windows/Android application. It requires administrator privileges on Windows, and enabling "Unknown Sources" under Android.

Windows Firewall will prompt the user to allow the software when running the server under Windows.

To avoid any installation issues, if the patient is to run the server from his or her home, it is recommended to lend the patient a pre-configured device as well as the ZMax hardware.

Additionally, one must consider issues with the user's browser and internet service provider blocking certain ports. This can make it impossible for the clinician to "dial in" to acquire data.

ZMax offers multiple ways to bypass annoying connectivity issues which would prevent remote monitoring of sleep data. These are particularly relevant when a Hypnodyne server must run in a patient's home (a new, and not previously tested environment). Please see the section bypassing connectivity restrictions.


Android application installation

To install the Hypnodyne server on an Android phone you must allow "Unknown Sources" under Settings -> Security as shown in the screen-shots below. Please note that screen options may vary depending on your version of the Android OS. If in doubt, or if the screen-shots below look different from the menus on your device, just google "Unknown Sources" followed by your Android version or mobile phone/tablet brand and model. It's a simple process needed to install apps that are not on the Google Play store.


Bypassing connectivity restrictions

Bypassing connectivity restrictions

A data link is established when a remote viewer, for instance a clinician, and a local patient, having a USB receiver, establish a network connection. The network connection is a simple TCP connection which can happen between two IP addresses.

Depending on preference, the patient can be the caller and the clinician the receiver. Or, the clinician can be the caller and the patient the receiver. As long as the connection can be established, data can be viewed and acquired.

There are three points at which connections can be prevented:

· The firewall on the patient's PC (or the device on which the Hypnodyne server is running)
· The router
· The internet service provider

ZMax provides several options to bypass these restrictions:

· When the patient is running the Hypnodyne server in "Receive network call" mode, the server can try to use Universal Plug and Play (UPnP) to open the necessary ports on the router. This requires the router to support UPnP. It requires UPnP to be enabled on the router (it normally is by default). It also assumes that the internet service provider is not blocking all ports (very uncommon with regular home internet plans). Under normal circumstances, the patient simply communicates the global IP address (displayed by the program) to the clinician, who places the call establishing the connection.
· The server can also run in "Make network call" mode. In this case, it is not the recording application used by the clinician that calls the server on the patient's side, but the server on the patient's side that makes the call to the recording application on the clinician's side. The advantage is that any network restrictions on the (less controllable) user's PC, router or internet plan are completely bypassed. The disadvantage is that the same restrictions must be overcome on the clinician's side. However since the clinician is presumably always utilizing the same physical location and PC, any networking issues can be resolved once and for all on the clinician's side and never again be encountered for new patients. When the patient is making the network call, it is the clinician who must inform the patient of the IP address to dial, and the user must input it before making the call.
· When a pre-configured device is supplied to the patient, and the device is an Android mobile phone, the "mobile data" plan on the mobile can be used for connectivity instead of the user's home router. Mobile data normally only works when the patient uses the server in "Make network call" mode - but it allows a completely seamless experience for the patient, since no internet connection at home is even necessary. Do note, however, that the mobile device must have sufficient charge prior to the patient's sleep time, so that it can receive data for the whole night. Unfortunately mobile phones still do not allow recharging the battery while operating a USB peripheral as a host at the same time. So the patient still has the burden of ensuring a full charge before he or she goes to bed, hopefully not too big of an obstacle for most.


Working with memory cards

ZMax can record to a Micro SD memory card that has been appropriately configured.

Each Hypnodyne memory card has a predetermined number of 'slots'. Slots are empty files that get filled with data by ZMax during recording. Each time ZMax begins a memory card recording, a new slot is used.

Slot names are fixed. Prior to using a slot, ZMax writes the "Date Modified" field with the current date. Unused slots display the earliest system date of 2012. When viewing the contents of a ZMax memory card on Windows, you can use the "Date Modified" field to determine the last occupied slot.

All slots have an identical file size.

To parse a slot file into a set of EDF files that you can open with HDScorer or other applications, open HDRecorder.

Then navigate to "Read from memory card"

Now you can simply drag and drop a file from your memory card onto the grey rectangle on the right. HDRecorder will ask you where you want to save the parsed EDF files. HDRecorder will overwrite any existing files in this directory.

After parsing, the folder with your EDF files will automatically open. It is recommended to use a generic "export" folder to parse new memory card slots, and subsequently move these files to an appropriately named directory (for instance, with the date and/or patient name). Please note that neither the slot files nor EDF files are compressed. Archiving files using a compression utility like WinRAR is highly recommended if you wish to share these files. If the resulting file size is still substantial, you may want to consider using services like wetransfer.com to e-mail files to avoid jamming the recipient's e-mail client, or having your file rejected by their e-mail server.

Please also see the PPGParser utility section for help on how to extract even more data from your ZMax raw data files.

Caution

Hypnodyne memory cards can be read using a Windows PC. However, do not modify the contents of a Hypnodyne memory card using your PC, as this will prevent ZMax from storing files.

In particular,

· Do not change the volume label
· Do not format the card using Windows Format
· Do not erase slot files from Windows Explorer
· Do not change the name of the slot files

If your memory card has empty space on it, you can save other files on the memory card, this will not confuse ZMax as long as the precautions above are observed.

When a memory card is full

To prevent accidental data loss, ZMax will refuse to write to the memory card when all its slots have been used. To clear the memory card, you must recreate the slots using HDFormat.

HDFormat automatically detects all removable media connected to your computer. However it cannot distinguish memory cards from USB thumb drives, so please make sure the right drive is selected before continuing.

When you click "Create slots" the program will recreate and initialize all the slots on the memory card. All previously saved data will be lost.

You are once again ready to record data on the memory card using ZMax.

* If you have purchased a new memory card from a store and you are using it for the first time, please click "Initialize card (first use)" first. HDFormat will restart after the card has been initialized, and you can now create the slots.


Types of artifacts

These are some common artifacts that you may observe while monitoring or scoring ZMax signals.

Packet loss

Cause: poor radio link strength.

Solution: place the ZMax USB receiver closer to the patient. See System fundamentals > Radio link strength

Electrode disconnection

Frequency: common with first-time users, rare afterwards.

Cause: gel pad disconnected or nearly disconnected from skin

Solution: ensure proper electrode contact. Tighten headband. See Trouble-shooting > Electrode disconnections

An electrode disconnection can result in a simple flat line, or a signal that moves up and down with breathing.

Sometimes, the signal oscillates so much that is gets clipped at both ends. Either way the EEG signal is completely lost.

Electrical noise

Electrical noise may compromise the spectrogram quality even though it can be filtered out easily for scoring. To determine the amount of high frequency noise please switch off filtering.

Frequency: commonly very moderate. Rarely problematic.

Cause: patient near an electrical cable.

Solution: move the patient away from power cables. If the external nasal sensor was used, try unplugging it.

Spikes

Frequency: extremely rare

Cause: possible electrical malfunction.

Solution: if recording with ZMax and another PSG system at the same time on the same patient, make sure that the electrodes of the two devices are not touching. You may damage both instruments.

Heart rate artifacts

Frequency: very rare

Cause: the forehead is pulsating with heart beats. Headband may be too tight.

Solution: reposition the patient. Loosen the headband.

Sweat artifacts

They are to be avoided as much as possible because the frequency of sweating artifacts overlaps that of delta waves and it is impossible to separate them. Furthermore sleep scoring relies on measuring the intensity and frequency of delta waves. Sweat artifact presence decreases the accuracy of N2 vs N3 sleep stage determination.

Frequency: common

Cause: the patient is sweating

Solution: prevent the patient from sweating by lowering the room temperature or reducing the thickness of blankets or clothing.

Only breathing visible on PPG signal

Frequency: very rare

Cause: the headband is too loose and almost coming off

Solution: tighten the headband

Light flicker contamination

Frequency: common

Cause: a flickering light source is reaching the PPG sensor

Solution: turn off the light

Snoring

Frequency: common

Cause: the patient is snoring

Solution: no action is necessary


Common patterns

The most common sleep features are shown here as they appear on ZMax signals.

K complexes

Spindles

Delta

REMS

WAKE eye movements (reading)

SEMS

EMG

N1 mixed activity

Arousals


Electrode disconnections

If you are seeing big signal gaps in a recording you have made (the signal flat-lined), most likely one or more of the gel pads became dislodged throughout the night.

It is not necessary for one of the gel pads under the ZMax electrode patch to become fully detached, for the EEG signal to disappear (flat-line).

When the contact between a gel pad and the skin becomes very poor the difference in impedance between that gel pad and the other gel pads prevents the amplifiers from seeing a signal. Additionally when a portion (flap) of the gel pad becomes detached, electrode impedance can change dramatically with respiration.

It is important to ensure that the entire surface of the gel pads remains attached to the skin throughout the night to obtain a high quality recording.

· The headband will naturally cover the entire length of the electrode patch. Check in the mirror after wearing ZMax to ensure there is no misalignment. The headband should cover the two gel pads at both sides of the electrode patch
· Is hair getting trapped under the lateral gel pads because the electrode patch is too long for your head? For females and children, a smaller electrode patch is available. You can also fold the electrode patch. The lateral gel pads should be placed on the temples or thereabouts. They should be in contact with the skin, and not any hair.
· Is the headband tight enough? A loose headband is the most likely cause of electrode disconnections.
· The headband should be fastened in such a way that the part at the back (where the velcro is) is a bit lower than the front (towards the back of the neck). This will stabilize the headband and prevent it from becoming loose as it slides downwards during night-time arousals.
· Do not fasten the headband way too tight, however. If it blocks your circulation it will be uncomfortable, and it may even degrade the signal quality by introducing heart rate artifacts as the forehead can pulsate depending on your sleeping position.
· If all else fails, or if you are recording an important night under hard to reproduce experimental conditions, you can wear a cap (such as an elastic disposable cap) though this is by no means necessary to achieve a high quality recording with ZMax.


Server connection problems

Android

Please note that Android does not allow non-system applications to bind to ports lower than 1024. All such attempts will fail. Fortunately, ports 1024 to 65535 should work so you have plenty of choice.

Windows

A patient or user normally runs HDServiceGUI.exe, the graphical user interface for the Hypnodyne server. This graphical application starts the server and it can also restart it in case of a crash. If connection problems are encountered, it is possible to run HDServiceGUI with the /debug command line option. This will make the server DOS console window visible (though it is still being controlled by the GUI). Sometimes useful debugging information can be obtained by looking at the output of the actual server window. Also, you may run HDServer.exe directly using command line options if you are so inclined. Then, the GUI won't interfere at all, and you will still be able to see the server output.


Creating a heart rate envelope

For help on creating a heart rate envelope EDF file please see the section Using PPGParser.


Connection

There are three ways to establish a connection with HDRecorder.

Record from local machine

This option automatically detects a Hypnodyne server running on the same machine and connects to it. Use this option when:

· You just want to test ZMax
· You are recording your own sleep using only one PC (no LAN/intranet or internet connection)

To record from the local machine, make sure that the Hypnodyne server is running (HDServiceGUI.exe).

When the server is running the "Connect" button on HDRecorder should be clickable. Click it to establish a call.

Make network call

This option connects to a Hypnodyne server on any IP address and port on the LAN/intranet or internet.

Use this option when:

· A patient has a Hypnodyne server running somewhere on the internet, perhaps at their home, and you wish to connect to acquire and view their sleep data
· You are running a sleep lab, the patient has a Hypnodyne server running in the sleeping room, and you are in another room but can access the server through the LAN/intranet or the internet.

To make a network call, enter the patient's IP address and port, then click Connect.

The patient's IP address is displayed to the patient when they start the server. Both a global and a local IP address are displayed. If you are in the same LAN/intranet you must use the local IP.

Which port is used is not important as long as both the server and the recorder are set to the same port. If one port fails, you can try another port. Commonly used ports that are often allowed by routers are port 80, 443, 22, 21, 25.

If no ports seem to work, the patient can check the box "Try to open router ports (UPnP)" prior to starting the server. When this option is checked, and if the patient's router supports UPnP, the server will try to open the most common ports, and route all of them to the internal server port. The patient can test which ports are working by pressing "Test ports". Working ports will be highlighted in green. HDRecorder can connect to the patient's PC using the patient's global IP address and one of the working ports. If none of these options work it is recommended for the patient to initiate the call instead (see the section below).

Receive network call

This option waits for incoming connections.

Use this option when:

· A patient has a Hypnodyne server running somewhere on the internet, perhaps at their home, but to avoid connectivity issues with incoming connections, you have instructed them to initiate the call to your IP address.

When set to receive network calls, HDRecorder will display both a global and local IP address. The patient must set the server to "Make network call" and enter the an IP address and port to call. The global IP should be used for internet calls, and the local IP for LAN/intranet calls. The connection setup is identical to the previous section, except that the roles are reversed.

When a connection is established HDRecorder will close the connection screen and open the signal viewer.


Viewing data

Upon connection with a Hypnodyne server, the viewer window is displayed. Hovering the mouse pointer over any section of the window displays some information on the status bar at the bottom.

Data begins streaming when:

· the server PC has the USB receiver peripheral plugged in
· the USB receiver is receiving data from a head-worn transmitter in its proximity

The panel on the right side of the viewer displays the temperature just above the patient's skin, the room illumination, the patient's heart rate (provided the PPG wave is valid) and the battery voltage.

Skin temperature

Temperature is acquired less than 1mm above the patient's forehead. The temperature indicator moves relatively slowly because it does not actually touch the skin.

Room illumination

This indicator is provided for reference only. It is unit-less.

Heart rate

The heart rate is only valid when the PPG wave (shown on the left side of the screen) is well behaved and the patient is not moving.

Battery

HDRecorder displays the battery voltage and remaining recording time.

Buttons

The state of the three buttons on the ZMax head-worn transmitter is displayed.

EEG

ZMax acquires two channels of EEG data. If you move your eyes left and right rapidly you will see characteristic 'bubbles' from the anti-correlated activity. Clenching your teeth will produce a high frequency EMG wave. Both are shown below.

Accelerometer

The XYZ section displays the 3 accelerometric axes. When filtering is enabled, the signal will appear flat, and any movement of the patient's head will be displayed as disturbances of this flat line. When filtering is disabled the three acceleration components will have different baselines. These baselines indicate the orientation of the head. Head orientation is displayed by HDScorer when scoring files. Future versions of HDRecorder will also display the head position in real time.

PPG

The PPG section shows infrared photoplethysmography acquired on the forehead.

However, when the external nasal sensor is used, the forehead PPG signal is replaced by a nasal PPG signal. Additionally, a secondary wave for the red component is shown alongside the infrared component.

These two PPG signals, alongside the DC components of both red and infrared, are used for SpO2 calculation in future versions of the software.

RESP

When the external nasal sensor is used two respiration channels are shown in the RESP section, one for each nostril.

SOUND

The sound section shows the noise level. It will display both heavy breathing/snoring and room ambience.

Zoom

You can zoom in and out using the mouse wheel while hovering over the section to zoom. Zooming makes a signal appear larger or smaller.

The Reset Zoom button resets all zoom levels.

Filtering

You can switch filtering on and off using the "Filter display" button. This has no effect on the stored data files; it only affects the display.


Storing files

HDRecorder can either store sleep data on your hard disk drive as you are monitoring is, or it can instruct the ZMax head-worn transmitter to begin storing data on an internal memory card. When memory card storage is used, no real-time signal viewing is possible.

Storing on the memory card

To store on the internal memory card, make sure the ZMax transmitter is switched on. Data should be streaming in real-time.

A memory card must be inserted in the ZMax head-worn transmitter. Simply click "Store on memory card".

Please note that the memory card must be properly initialized for use with ZMax or an error will occur. Also, the memory card must have a free slot or an error will occur.

HDRecorder will ask you to confirm the next available slot on the memory card.

When you click OK, the transmitter will emit a sound and begin recording. At this point no communication between HDRecorder and ZMax is possible until ZMax is switched off.

Please make sure to switch off the ZMax transmitter before removing the memory card or you will lose the saved data.

Storing on the hard disk drive (while monitoring the signal)

To begin storing data with one click, simply click "Store on disk drive".

A new folder with the current system date and time will be created under the Data folder in your program directory. Files will be stored in this folder.

If you right click on the "Store on disk drive" icon instead of left clicking, HDRecorder will prompt you to select an existing directory for storing the files. Then it will ask you for an optional patient ID that will be added to the EDF files header.

Upon confirmation, the recording will start. Data shown on the screen is being progressively saved to your hard drive. Click "Stop recording" when you wish to terminate the recording.

If you want to inspect the files without stopping the recording, you can use the "Save a copy" button. This creates a copy of the files that you can open with other software while HDRecorder is still acquiring data.


Diagnosing wireless link quality

During wireless recording the HDRecorder signal viewer displays the link quality using a bar on the right side of the window.

The largest number is the number of samples per second for the EEG signal. The maximum is 256 samples per second. An additional number ("Recon:") displays the number of EEG packets that were reconstructed using retransmission. In the illustration above, the EEG signal is being acquired losslessly, however 117 packets out of 256 were initially lost, and data has been recovered using retransmission.

This means that during the last second, non-EEG signals (accelerometer, PPG, light, noise etc) suffered packet loss and only consist of 256-117 = 139 packets.

When the Reconstructed packet indicator is higher than 30-50 packets, it is advisable to reorient the transmitter or the receiver, or place the receiver closer to the patient, or plug in the external antenna. Please see the Radio link strength section.

Whether packet loss is having an effect on incoming data can be verified by switching off filtering using the "Filter display" button.

The raw incoming signal can then be observed. For instance below is a screenshot showing PPG signal suffering packet loss. Heart rate determination will not be affected; however SpO2 determination may occasionally be affected due to an apparent change in peak amplitude.

The button "Hear signal strength" can be useful when testing radio link quality. This function uses speech synthesis to continuously announce the number of packets received in the last second.

This allows you to test different sleeping positions while wearing ZMax, to ensure all sleeping positions allow for good signal reception.

Finally the "Interp:" number shows the number of packets interpolated by the server due to a signal lost condition. The server tries to fill in data to avoid corrupting the time base of the recording. This number will be very high when the receiver returns from a signal lost condition. Otherwise it should be zero at all times.


Alerts

For the convenience of the clinician, HDRecorder attempts to detect common problems with the recording and displays an alert accordingly.

When the "Sound on alerts" option is selected, HDRecorder will play a sound when the system moves from a state with no alerts displayed to a state in which at least one alert is displayed.

Network disconnection

Connection with the Hypnodyne server was lost.

Dongle disconnection

The server is connected but no USB receiver is plugged in on the server side.

Low signal strength

HDRecorder is receiving too little data.

Low battery

The ZMax transmitter needs to be recharged

Recording compromised

Under ordinary circumstances, the server attempts to "fill" data gaps that arise when the transmitter goes out of range. You can see this happening if you switch off the transmitter briefly and turn it back on. The server interpolates between the last received data point and the newly received data point. In such case lots of data is received (generated) very quickly. Interpolation does not "fix" the problem, and spectral contamination on the EEG channels may still be present; however, at least the time base of the recording is preserved.

However, note that if the transmitter goes silent for more than several minutes, the server no longer attempts to fill the gap. When this alert appears, the time base of your resulting file is not reliable and this alert will be shown.

Heart rate artifact

This alert is shown when a strong spectral spike around the 1Hz frequency is detected in the EEG signal. This often indicates that the EEG signal is contaminated with heart pulsations, most likely resulting from the headband being too tight.

Low frequency artifact

Whenever the EEG signal exhibits some very low frequency drift (such as during periods of sweating) this alert is displayed. This alert is also shown when the EEG signal is settling after wearing the device or after a significant arousal or electrode movement.

The following alerts apply to either the left or the right channel or both.

High frequency artifact

This alert is displayed when excessive high frequency activity is detected on either EEG channel. The high frequency activity can be caused by clenching the teeth, electrical interference or improper electrode contact.

Signal rail

This alert is displayed when either EEG channel moves close to the positive or negative limit (rail). This occurs due to electrode connection problems or a significant arousal that has momentarily displaced one or more of the gel pads on the electrode patch below the transmitter.

Electrode disconnection

This alert is displayed when EEG signal on either electrode has been lost. The ZMax transmitter should be checked and the headband should be better fastened to avoid electrode disconnection during movement.


Introduction

A lucid dream is a dream during which the dreamer is aware of dreaming. During lucid dreaming, the dreamer may be able to exert some degree of control over the dream characters, narrative, and environment.

HDRecorder is able to monitor your sleep in real-time and detect when a dream is occurring by analyzing your eye movement and brain activity.

Once a dream is detected, HDRecorder can deliver a stimulus (also known as a dream cue). Often, and depending on practice, this stimulus can be recognized within the dream, bringing about the realization that one is dreaming.

When this occurs, the content of dreams can generally be controlled.


Voice dream logging

Lucid dreamers know that without remembering the content of dreams, all their efforts are wasted. Remembering dreams involves keeping a dream log or dream diary.

This has traditionally required turning on a light, finding pen and paper, and keeping your eyes open until you have written down your dream.

Unfortunately, returning to sleep is often difficult after logging a dream on a dream journal. Many people give up lucid dreaming and dream tracking because the act of logging requires too much discipline.

HDRecorder allows you to record a sound file by just pushing a button on the forehead-worn ZMax transmitter, without ever needing to open your eyes or switch on the light. Each time the button is pushed, a new MP3 file is recorder in the program folder under /entries.

The Dream logging feature is by default associated with the left-most ZMax button.

To record a dream log,

- At any time throughout the night, when HDRecorder is acquiring data wirelessly, press the left ZMax button

- HDRecorder will begin capturing audio data using your PC's microphone. HDRecorder will use voice synthesis to confirm audio recording has begun

- Record the content of your dream by simply speaking.

- Press the left ZMax button again to terminate the recording. HDRecorder will again use voice synthesis to confirm. The entire operation can be carried out without the need to open your eyes.

Note: dream log recording does not affect data acquisition. HDRecorder continues to acquire sleep data as you fall back asleep, and will continue to deliver dream cues if running in Lucid dreaming mode.


Testing dream cues

Find the Advanced toolbox in signal viewer. Click on the Light Stimulation icon (represented by the light bulb).

The Light Stimulation window will open. Here you test different light patterns and colors.

Light only

For simple light stimulation, select a color and a light intensity. The ON time represents the amount of time that the light stays on for each cycle (blink). The OFF time represents the amount of time that the light stays off between each cycle. "Blink times" represents the number of cycles. "Alternate eyes" instructs ZMax to stimulate the patient's eyes one by one (left, right, left right...). When "Alternate eyes" is not checked, both eyes are stimulated at every blink.

Light and vibration

To add vibration to your stimulus, simply check "Vibrate". Vibration is enabled during the ON time and disabled during the OFF time. An ON time of at least 0.2ms is recommended.

Vibration only

For a purely vibratory stimulus (no light stimulus), select the black light color and check "Vibrate".

For convenience, the "Vibratory stimulation" button starts the Stimulation window in "vibration only" mode, with light options disabled.


Starting a LD session

When you have chosen a suitable dream cue, you are ready to begin lucid dreaming.

Click the "Lucid dreaming mode" button.

The Lucid dreaming window will open.

Stimulation

The Stimulation section is identical to the "Light stimulation" window and allows you to specify the type of dream cue you want to use.

Detection

The Detection section tells HDRecorder how you wish to detect REM sleep (dreaming). It has two options, Night mode and Nap mode.

Night mode cannot detect dreams before two hours of sleep have elapsed. This is because it needs to analyze your sleep phenotype. Select Night mode when you are going to be sleeping for several hours.

Nap mode can detect dreams immediately, but requires a Quick Phenotype file produced using night mode. The Quick Phenotype file is specific to each person. If multiple users will be using ZMax for lucid dreaming, it is recommended that you save the Quick Phenotype file with different names after each user goes through a "Night mode" lucid dreaming session.

As default, the Quick Phenotype file used in Nap mode is the one stored in the program folder. You only need to click Browse and find a phenotype file if you have saved it elsewhere or wish to use another Quick Phenotype file.

Trigger

The Trigger section allows you to increase the time prior to stimulation ("Only stimulate after"). In Night mode this is at least 2 hours. In Nap mode there is no restriction. For instance if you wish to avoid stimulation for the first 5 hours of sleep, drag the slider until the label reads "5h".

The Trigger section also allows you to set the minimum interval between stimulations. More frequent stimulations increase the possibility that the stimulation will be incorporated within a dream. If "zero" is chosen, the minimum stimulation interval is still at least 30 seconds (one epoch), since REM detection occurs on an epoch by epoch basis.

Starting the session

To start the lucid dreaming session, click "OK". HDRecorder must be saving data in order for REM detection and lucid dreaming stimulation to work. HDRecorder automatically prompts you to start a recording.

If you choose "No", Lucid dreaming mode will be engaged but wait for the recording to be started manually. The dark yellow "LD" label on the status bar will be displayed.

When the recording is started, the "LD" label turns bright yellow. You are ready to lucid dream!

To terminate/abort a Lucid dreaming session, just open the Lucid Dreaming window again and click "Cancel/Terminate" (you must stop the recording first).


Viewing LD results

Once you wake up, click "Stop recording".

The folder containing your data files will open automatically.

Quick Phenotype file

If you entered Lucid dreaming mode with the "night" option, and HDRecorder was able to analyze your sleep and obtain a Quick Phenotype file, the program will prompt you to save that file anywhere on your disk. The Quick Phenotype file is used when you wish to lucid dream but do not plan on being asleep for several hours, for instance if you start a LD session in the early morning, or prior to a nap. In this case you will enter Lucid dreaming mode with the "nap" option, and specify the Quick Phenotype file so that HDRecorder can detect REM immediately rather than waiting to have sufficient data to analyze your sleep.

If you are the only ZMax user, save the Quick Phenotype file in the program folder (the default). You will not need to worry about it again.

The program prompts you to store a Quick Phenotype file each time you complete a Lucid dreaming session with the "night" option. If you already have a saved Quick Phenotype file, you can just click "cancel".

Markers

If REM detection occurred, a marker file ("REM.MRK") will be present. This Marker file can be opened in HDScorer to visualize the epochs that HDScorer categorized as REM sleep, as well as which epochs resulted in a stimulation.

To view the results of your lucid dreaming session,

- Start HDScorer

- Import the sleep data files just created (File > Open)

- Import the markers from the same folder (File > Import markers)

- Use the "M" key on your keyboard to navigate through the REM epochs. Use the arrow keys to move around the REM detection areas.

- The marker description will be displayed on the spectrogram when you navigate to an epoch that has a marker.

- The marker description will indicate either "REM detection" or "REM detection and stimulation". A REM detection without stimulation is the result of the chosen "Trigger" settings disallowing stimulation.

Validate REM detection results

Epochs marked as REM should have anti-correlated "bubbles" indicating eye movement. HDRecorder should have successfully ignored epochs containing major body movements, anti-correlated activity not caused by REMs, and artifacts that would confuse less intelligent systems. Please note that HDRecorder values specificity over sensitivity - this means that many REM epochs will not be marked as REM. This is the preferred behavior for lucid dreaming, as REM segments contain many epochs, and one does not want to be stimulated during non-REM sleep.


Advanced

The file "startup.js" under the /js folder in the program folder contains several Javascript functions called by HDRecorder.

The function NewEpochReceived is called every 30 seconds. The isREM parameter is true when a REM detection occurs.

Scripting is still being developed, however you can, for instance, play a sound in response to REM detection with the following code.

Loading a script

To load a script, click the Script button (or right-click to reload the last loaded script).

Testing a script

To test your script in lucid dreaming mode, you must first have a saved recording.

- Start Lucid dreaming mode and answer "No" when the program prompts you to start recording

- Click the "Feed a saved record through a script" button and choose your data files (just click on any of the EDF files in the folder)

The functions of the three ZMax buttons can also be scripted. Some notes are included in the startup.js file under the /js folder. Please do not modify this file unless you are feeling very experimental :)


Sunrise

The Sunrise function delivers a gradually increasing, strong light stimulation to the patient. To test it, click the Sunrise button.

Then pick the starting time (usually in the morning) and the total duration.

Unlike Lucid dreaming mode, the Sunrise function does not need HDRecorder to be actively recording. When Sunrise is active, the "SR" label will be visible on the status bar.

To terminate/abort a Sunrise session, just open the Sunrise window again and click "Cancel/Terminate".


Auditory stimulation

To play a simple preset sound on the ZMax receiver, click the "Auditory stimulation" button.

The Auditory stimulation window will open.

Mild sound cue

The mild sound cue sound is provided to test how the patient reacts to a mild auditory stimulus.

Alarm

The alarm sound is provided when a script or remote clinician wishes to awaken a patient.

Note: ZMax uses a very low power microcontroller and cannot play a regular audio file. To play a regular audio file in response to a particular event, you can use the script command:

ZMax_PlaySound("C:\\mp3\\audiofile.mp3", 0);

The second parameter is the start position in seconds. The script location is /js/startup.js in the program folder.

Scripting is still under development and is beyond the scope of the current help file.


Connection

The function of the Hypnodyne server (HDServer) is to accept data sent by the ZMax head-worn transmitter and received by the Hypnodyne USB receiver plugged into the USB port of your PC - and pass this data on to any clients requesting it (for instance, a remote clinician).

HDServer must be running when:

· You or a clinician want to preview the signals being acquired, prior to storing them on a memory card inserted into the ZMax head-worn transmitter
· You or a clinician want to view the signals in real-time all throughout the night
· You or a clinician want to save the signals onto a hard disk drive on a personal computer

In other words, HDServer must be running as long as signals must pass through a PC and are not just saved directly on the memory card without previewing them.

HDServer is available as a window console application (HDServer.exe) for technically minded users.

However, most users will prefer to use the Windows application (HDServiceGUI.exe) instead.

When you just want to acquire data from your local machine (not passing through the internet or LAN), you can save a few clicks by using the QuickStart tool, which starts HDServer and HDRecorder, establishes a connection and displays the signal viewer directly.

The rest of this guide will assume that you want to establish a network call, and that you are not using QuickStart.

A Hypnodyne ZMax connection works a bit like a Skype call. One person makes the call and the other person receives it.

Either way, the person who is wearing the ZMax transmitter must be running HDServer. The person observing (and potentially storing) the data must be running HDRecorder.

Both HDServer and HDRecorder are capable of both making and receiving network calls.

This is the HDServer window. To start a connection, you can either choose to receive a network call or make one.

Receive network call

Use this option if you wish to set up your PC to wait for incoming calls from your LAN/intranet or the internet. A caller using the HDRecorder software will be able to "dial in" and view your real-time data.

Simply click "start server" and give your IP address to the calling person (give your global IP if the person is calling from outside your LAN, and the local IP if they are within the same LAN).

If you change the default port from 8000 to another number, please also give the person the port number you have chosen.

If no ports seem to allow a connection, try to check the "Try to open router ports (UPnP)" option. Thereafter, click the "Test ports" button. Ports that are highlighted in green can be used by the remote caller.

Make network call

Use this option if you wish to make an outbound call. A call receiver who is listening using the HDRecorder software will be able to receive your call and view your real-time data. If your clinician has asked you to run the server in your home and you are using it for the first time, and the clinician has successfully received network calls before, using this mode potentially avoids connectivity issues related to Windows Firewall, router settings and ports blocked by your ISP (Internet Service Provider).

To make a network call simply obtain from the call receiver their IP address and port, enter them and click "connect".

For more information about connections, please see the connection section under HDRecorder. Connectivity related functions are identical between HDServer and HDRecorder.

Call established

When a connection is established the server connection window will disappear and a small indicator will appear instead on the bottom right corner of your screen. This indicator shows the radio link quality. The maximum is 256 sps (samples per second).

Call terminated

When the call is over the indicator should disappear and the connection window should reappear.

Please note that Windows detection of closed sockets is not very fast or reliable. It could take up to a minute for the disconnection to be detected. If the indicator fails to close and you know the call is over, you can right-click the indicator and click "close" to stop the server. You can also stop the server during a call and interrupt the call if you wish to do so.


Receiver placement

You will want to place the USB receiver close to your bed (within 1-2 meters). Though not strictly necessary, we recommend placing the receiver behind your head, as opposed to on one side of the bed. By placing the receiver behind the head (or even under the bed) the radio quality will not change much depending on your sleeping position. On the other hand, if the receiver is on one side of the bed, radio quality will be affected by the orientation of your head and your sleeping position.

Please see the Radio link strength for more information and tips.


Console mode

You can run the console version of the Hypnodyne server (HDServer.exe) from a batch script.

If you wish to view the command line options for HDServer just type hdserver -h from the command prompt and HDServer will display the possible options.

Here are some possibilities for running HDServer from the command prompt

HDServer.exe

Starts the server on the default port (8000)

HDServer.exe -p=123

Starts the server on port 123

HDServer.exe -p=123 -u=80,443

Starts the server on port 123, then tries to use UPnP to open ports 80 and 443 on the router, and redirect them to local port 123.

HDServer.exe -o=192.168.0.102:8000

Starts the server in "Make network call" mode and places a call to IP 192.168.0.102, port 8000

HDServer.exe -t

Starts the server, then opens a telnet window to test the connection.


Overview

HDScorer is a simple sleep scoring software included with ZMax.


Importing EDF files

HDScorer natively uses EDF files. To open sleep data simply click File > Open and navigate to a directory in which a set of ZMax EDF files are stored.

All the files in the directory will be imported regardless of which file you click. As the files load the progress will be displayed.

As soon as the files are loaded, you can begin exploring the recording. As you do this, the software is computing the spectrograms in the background. Until the spectrograms have been created, the upper portion of the screen will show a progress indicator.

When the spectrograms have been computed the default spectrogram will be shown at the top. By saving your file now you will avoid the delay in spectrogram visualization the next time the recording is opened.


Navigating and viewing

Screen layout

HDScorer displays the current epoch at the center of the screen.

Below the epoch you can find the beginning and end time of the epoch, both in absolute time and in seconds.

The absolute time is computed using the recording start time on the first EDF file (EEG L.edf).

The HDScorer screen is divided into horizontal slices. The top slice shows the hypnogram overlayed onto the spectrogram, as well as the light envelope.

The other slices are

· The two EEG channels
· The three accelerometer axes
· The PPG signal
· The amount of noise

* Because ZMax acquires two EEG channels on both sides of the forehead, with a reference electrode at the center of the forehead, EOG activity is overlayed onto the EEG. This is actually quite useful, because eye movements create strongly anti-correlated activity that creates characteristic 'bubbles' in the superimposed EEG traces. This allows very quick scoring of REM and WAKE epochs.

* Because the ZMax transmitter picks up noise levels on the patient's head, respiration and snoring are often visible as periodic activity on the noise channel. This allows heavy breathing and snoring to be observed.

Moving through the recording

To navigate through the recording you can use

· Left or PageUp key: move back by one epoch
· Right or PageDown key: move forward by one epoch
· Home key: go to the first epoch
· End key: go to the last epoch
· You can click and drag on the spectrogram to move through the signal
· By pressing the "E" key you can open a dialog where you can enter the epoch number.

Zooming in and out

To increase or decrease the magnification of a particular track, move to that track and use the mouse wheel to zoom in and out.

To restore all zoom levels, click "Reset view" on the top tool bar.

The EEG track has two horizontal lines at +-37.5uV used for determining delta wave amplitude. These will move as you zoom.

* You can set the filtering frequencies for each track.

Light envelope

The light envelope is a measure of the room illumination as seen from the patient's head direction. It is drawn in yellow above the top spectrogram. It is used to set the lights out/lights on times.

To toggle the light envelope click the "Show light" button on the top toolbar.


Spectrograms

HDScorer produces two types of spectrogram. The first is a regular spectrogram.

The second is a powerful visualization method developed by Hypnodyne called the "X-Ray" of the spectrogram. It is a type of high pass filter that shows only significant frequency 'ridges' such as alpha, theta and spindle activity.

A patient's phenotype (the exact visual positioning of spindles and alpha frequencies) is immediately visually determinable using the X-Ray method. Very faint activity can be spotted that is invisible in the regular spectrogram.

Both the regular spectrogram and the X-Ray spectrogram are displayed below the hypnogram at the top of the screen. Only one type of spectrogram is visible at one time.

To switch between the normal spectrogram and the X-Ray, use the "Spectrogram" and "X-Ray" buttons on the top toolbar.


Filtering

HDScorer can switch rapidly between filtered and unfiltered (raw) views of the signal.

To switch, push the "Down" key on your keyboard or click the "Raw" button on the top toolbar.

Raw view is useful when diagnosing artifacts, because it allows you to see the signal exactly as acquired.

The button "Reset view" will switch the signal back to filtered and reset all zoom levels.

To change low and high cut frequencies simply click on any of the tracks and enter your desired frequencies. Default frequencies are optimized for viewing the type of signal shown in the track.


Colors

Click on any of the tracks to bring up the track properties dialog. Here you can change the color(s) for the chosen track.


Setting lights out and lights on

In some instances a ZMax recording begins when the lights are still on, and ends after the lights are switched on in the morning.

In these cases the light envelope displayed at the top of the screen in yellow will allow a scorer to easily determine the lights off/lights on times.

When lights out/lights on times are irrelevant you can leave the lights out/lights on times at their default values (before the first epoch and after the last epoch.

To set lights out time, navigate with the cursor around the time when the light envelope declines. Then adjust the position with the arrow keys. Finally, click the toolbar button "Set lights out" and confirm the epoch number.

The initial part of the recording will be darkened to signify that it is not part of the total sleep time.

To set lights on time, position the cursor and click "Set lights on". The final part of the recording will be darkened accordingly.

Here is the final result. The lights out/lights on times are used by HDScorer when producing the sleep report.

After setting lights out/lights on times you may want to hide the light envelope by clicking on "Show light" on the top toolbar. It can be displayed again easily by clicking the same button a second time.


Scoring

To score an epoch simply press:

· 'W' to score as Wake
· 'R' to score as REM
· '1' to score as N1
· '2' to score as N2
· '3' to score as N3
· The Del key to remove the scoring for the current epoch

Alternatively you can click on one of the buttons on the scoring toolbar:

When you score an epoch, the software will automatically advance to the next epoch.

When you navigate to an epoch that was previously scored, the epoch scoring is displayed in the lower right corner of the window.

Also see: Types of artifacts, Common patterns sections


Saving

A file named HDScore.dat is created by the software when you click File > Save

This file includes the computed spectrograms, the scoring, lights out/lights on times and other settings.

You must leave this file in the directory where the EDF files are stored if you wish to have it automatically loaded the next time you open the files.

If you want to wipe all stored data and start a new scoring for the same night, then you can simply erase this file.


Import/Export scoring

If you want to export your scoring in text format for processing with other software, simply click File > Export scoring and choose an output file name.

The file is exported with the CSV extension so it can be read in with Excel and common MATLAB functions.

To load a scoring file click File > Import scoring.

File format

The CSV file has N+2 lines where N is the number of epochs.

Each line consists of 8 comma separated values.

1. The letter E for epoch

2. The epoch number

3, A number representing the scoring (0 = unscored, 1 = N1, 2 = N2, 3 = N3, 4 = REM, 5 = WAKE).

4. A letter representing the scoring (1, 2, 3, R, W - or U for unscored)

5. The epoch start time in seconds from the beginning of the recording. The first epoch starts at 0 seconds.

6. The epoch end time in seconds from the beginning of the recording (inclusive). The first epoch ends at 29 seconds.

7. The epoch start time in extended format (ex. 4/9/2016 5:18:01 AM)

8. The epoch end time in extended format (ex. 4/9/2016 5:18:30 AM)

At the end of the file there are two extra lines for the Lights Out epoch (LOUT) and Lights On epoch (LON).

These lines have only two comma separated values, the tag (LOUT or LON) and the epoch number.


Report

After setting Lights Out and Lights On times and scoring the file, you should have a neat hypnogram at the top, overlayed over the spectrogram.

To produce a sleep report click File > Output report.

The software will ask you for a patient ID, the ID is written at the top of the sleep report.

After you click OK the program will be busy for a few seconds. Then it will open your default browser and a sleep report will be displayed.

The sleep report is a pure HTML file with no dependencies. You can print it, save it and email it.

To view a sample of our most recent sleep report output, please navigate to: http://hypnodynecorp.com/sleepreport.html


Markers

HDScorer can import time-coded sleep events called markers, produced by HDScorer.

Currently the only type of marker is the REM detection and lucid dreaming stimulation marker file output by HDRecorder during lucid dreaming mode.

To open a marker file, navigate to File > Import markers and select your marker file.

A horizontal black bar (the marker track) will appear. Markers are represented on the marker track by colored bars.

When you navigate to an epoch that has associated markers, the marker description will be overlayed at the top right of the spectrogram.

To quickly navigate through markers, simply press the "M" key on your keyboard.


Usage

Please see Working with memory cards for a quick introduction.


Using PPGParser

 Top Previous

PPGParser functionality

The main function of PPGParser is to output an envelope of the heart rate throughout the night.

How to use PPGParser

To carry out the conversion, simply select all the EDF files saved by HDRecorder and drag and drop them on the PPGParser program icon.

When the program finishes, it will wait for a keystroke and then exit.

You will find the PARSED_* files in the same directory as the input EDF files. PARSED_HR_ir.edf contains the heart rate estimation.

Advanced usage

PPGParser processes ZMax raw data files and outputs several processed EDF files.

· PPGParser "stitches" OXY_R_AC, OXY_IR_AC, NASAL L and NASAL_R. The stitching process consists in removing "jumps" created by intelligent real-time adjustment of the ZMax PPG sensor. PPGParser also filters the resulting signals. Finally, it outputs corresponding files with the prefix "PARSED_". Please note that since the result is filtered, artifacts due to movements and flickering ambient light will be much less easily interpreted. For this reason, HDScorer and HDRecorder both allow easy switching between filtered and non filtered displays. Neither HDScorer nor HDRecorder require these parsed EDF files, however. They are simply made available by PPGParser for your convenience if you need to feed raw but clean PPG data into your own analysis algorithm, perhaps a MATLAB script.

· PPGParser also produced two EDF files containing the heart rate envelope. One (PARSED_HR_ir.edf) is computed using the infrared PPG AC component (present regardless of whether the external Hypnodyne nasal sensor is used). One (PARSED_HR_r.edf) only contains data when OXY_R_AC.edf itself contains data (i.e. when the external nasal sensor is used). This redundant output may allow you to compare the accuracy of the signal acquired using the two wavelengths (red and IR). In most cases PARSED_HR_ir.edf is the only file you will need.

*In the near future, PPGParser will also output the SpO2 envelope (when the external Hypnodyne nasal sensor was used during recording).