epics slac virtual lab design documentation documents...  · web viewthis lack of vibration ......

68
SLAC: Virtual Masking Documentation I. Table of Contents I. Table of Contents II. Introduction III. Project Partner IV. Sound and the Ear a. Biology of the Ear b. Disease Pathologies V. Masking a. Audiograms b. Patient History c. Test Procedures d. Plateau Method & Plots VI. Project Basics a. Getting Started With Open Source b. Introduction to C# and Visual Studio .NET c. C# and Visual Studio .NET Skill Session d. Core C# and .NET Quick Reference VII. Virtual Project Tutorials a. Creating New Graphics II. Introduction The Speech Language Audiology Clinic team (part of Engineering Projects in Community Service at Purdue University) serves the M.D. Steer Audiology Clinic, located in the basement of Heavilon Hall on Purdue’s campus. Members are Purdue students from many disciplines who work in conjunction with assistant professor in Speech Language Hearing Sciences Dr. Joshua Alexander to solve the unique 1

Upload: vanquynh

Post on 01-Feb-2018

238 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

SLAC: Virtual Masking Documentation

I. Table of ContentsI. Table of ContentsII. IntroductionIII. Project PartnerIV. Sound and the Ear

a. Biology of the Earb. Disease Pathologies

V. Maskinga. Audiogramsb. Patient Historyc. Test Proceduresd. Plateau Method & Plots

VI. Project Basicsa. Getting Started With Open Sourceb. Introduction to C# and Visual Studio .NETc. C# and Visual Studio .NET Skill Sessiond. Core C# and .NET Quick Reference

VII. Virtual Project Tutorialsa. Creating New Graphics

II. IntroductionThe Speech Language Audiology Clinic team (part of Engineering Projects in

Community Service at Purdue University) serves the M.D. Steer Audiology Clinic, located in the basement of Heavilon Hall on Purdue’s campus. Members are Purdue students from many disciplines who work in conjunction with assistant professor in Speech Language Hearing Sciences Dr. Joshua Alexander to solve the unique problems the clinic faces. Purdue academics make use of the clinic, but it also functions as a private medical facility. The widespread impact the clinic has on the community makes it a perfect organization to benefit from personalized engineering projects.

One of the projects for the spring 2011 semester will be the SLAC virtual masking project. The virtual project has been worked on close to a decade now with the first completed version being delivered in the fall 2010 semester.  The goal for this group is to improve upon the delivered version of the program by adding new patient images, improving graphics, and adding randomization to current features.

1

Page 2: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

The Virtual Masking Project is a simulation of a hearing loss test, from the perspective of the proctor. The software will directly benefit audiology students who are learning about the testing process and the different types of hearing loss. A real human with a certain hearing condition would be ideal to test on, but some of the conditions are rare or they won’t agree to be a subject. Thus the software will be an excellent tool for getting students exposure to many kinds of hearing loss. The basic design and functionality were previously determined by Dr. Novak and currently under the supervision of Dr. Alexander, who has a good vision of the final working version.

Specification Development

This software will be used for teaching audiology students the testing process for hearing loss through a direct simulation. Overall, the software needs to mimic the real life process as closely as possible. For the purpose that someone using our program must be able to:

Provide a stimulus and masking See a patient response Plot a hearing assessment Generate a plateau plot Have enough data to properly determine the virtual patient’s hearing condition Create a report of that test for professor/TA grading

The base criteria were first determined by Dr. Novak, which were then specified by our group. Many of the previous software versions followed this blueprint. The requirements are fairly simple and have a straightforward software implementation. The requirements specified are:

Clickable photo of a physical audiometer Plot-able hearing assessment graph (blank template is provided) A picture of a human patient (wearing stimulus device if applicable) Plateau Plot End of test review/comparison with “correct” answer and/or grade report Hints/info for next time

Now the goal is to improve the project with as many realistic and innovative functions that the project partner specifies until it becomes the ideal project that the project partner desires.

III. Project PartnerOur previous project partner was Dr. Robert Novak, the former head of the M.D.

Steer Audiology Clinic. A new project partner, Professor Alexander, joined the SLAC team this semester. The main role that the project partner has in the virtual project is to

2

Page 3: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

provide feedback and suggestions of ideal functions that the project could possess. Communications with the project partner either through email or physical meetings are important to keep track of during the semester.

IV. Sound and the Ear

A. Biology of the Ear

Sound is a form of energy that moves through air, water, and other matter, in waves of pressure. Sound is the means of auditory communication, including frog calls, bird songs and spoken language. Although the ear is the vertebrate sense organ that recognizes sound, it is the brain and central nervous system that "hears". Sound waves are perceived by the brain through the firing of nerve cells in the auditory portion of the central nervous system. The ear changes sound pressure waves from the outside world into a signal of nerve impulses sent to the brain. The human ear can generally hear sounds with frequencies between 20 Hz to 20 kHz.

The outer part of the ear collects sound. This outer ear includes the pinna, the ear canal, and the tympanic membrane. This portion of the ear is vital for hearing. The outer ear does help get sound and impose filtering, but the ear canal is very important. Unless the canal is open, hearing will be dampened. The outer ear ends at the most superficial layer of the tympanic membrane. The tympanic membrane is commonly called the eardrum.

The middle ear, an air-filled cavity beginning at the inner portion of the ear drum, includes the three ear bones or ossicles: the malleus (hammer), incus (anvil), and stapes (stirrup). The malleus has a long process (the manubrium, or handle) that is attached to the mobile portion of the eardrum. The incus is the bridge between the malleus and stapes. The stapes is the smallest named bone in the human body. The three bones are arranged so that movement of the tympanic membrane causes movement of the malleus, which causes movement of the incus, which causes movement of the stapes. When the stapes footplate pushes on the oval window, it causes movement of fluid within the cochlea (a portion of the inner ear). These ossicles function to transmit energy, facilitating the transfer of energy from acoustic energy at the eardrum to mechanical at the ossicles to hydrolic in the cochlea.

3

Page 4: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

The middle ear, like the ear canal, is filled with air. Unlike the open ear canal, however, the air of the middle ear is not in direct contact with the atmosphere outside the body. The Eustachian tube connects from the chamber of the middle ear to the back of the nasopharynx and equalizes pressure between the atmosphere and the middle ear cavity.

After that sound pressure is amplified through the middle ear, it reaches the inner ear. The inner ear, embedded in the temporal bone, is filled with fluid and contains a sensory epithelium that is lined with hair cells. The microscopic "hairs" of these cells are structural protein filaments that project out into the fluid. The hair cells are receptors that release a chemical neurotransmitter when stimulated. Sound waves moving through fluid push the filaments, triggering nerve impulses. The nerve impulses travel from the left and right ears through the eighth cranial nerve to both sides of the brain stem and up to the portion of the cerebral cortex dedicated to sound. This auditory part of the cerebral cortex is in the temporal lobe.

A conductive hearing loss refers to a hearing loss caused by an abnormality in the outer ear or the middle ear. Possible causes include a blocked ear canal, perforations in the eardrum, irregular ossicles, or fluid in the middle ear.

Sensorineural hearing loss refers to a hearing loss occurring due to abnormalities in the inner ear, along the neural path, or the auditory cortex.

B. Disease Pathologies

Presbycusis: (Older adults)Presbycusis is the loss of hearing that gradually occurs in most individuals as they

grow older.  The loss associated with presbycusis is usually greater for high frequency sounds. Presbycusis most often occurs in both ears simultaneously. Because the loss of hearing is so gradual, people with presbycusis may not realize that their hearing is diminishing, and may have trouble understanding conversation in background noise. Presbycusis is caused by cumulative factors, including repeated daily noise exposure, hereditary factors, health conditions, effects of medicine, and changes in blood supply to the ear, which all are related to aging. Presbycusis is common, affecting a third of people between 65 and 75 years, and up to half of people 75 and over. (NIDCD)

Noise-induced trauma: (More common in adults)This refers to permanent cochlear damage from a one-time exposure to excessive

sound pressure.  This hearing loss commonly results from exposure to high-intensity sounds such as explosions, gun fire, and firecrackers.

Meniere’s Disease: (All ages and genders, more likely adults ages 40-60*)A disorder of the inner ear which causes episodes of vertigo, ringing in the ears, a

feeling of fullness or pressure in the ear, and fluctuating hearing loss.  A low-frequency sensioneural pattern is commonly found initially, but as time goes on, it usually changes into a flat loss.  Meniere’s Disease usually starts confined to one ear but it often extends to involve both ears over time. *NIDCD

Microtia with Atresia: (Present at birth)

4

Page 5: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Microtia refers to a small, abnormally shaped or absent external ear and Atresia involves an extremely narrow or absent external ear canal. It can affect one or both sides.

Otosclerosis: (More common in women, Ages 15 – 45*)The cause of otosclerosis is unknown, but there appears to be a hereditary

component. In otosclerosis, an abnormal sponge-like bone grows in the middle ear, which prevents the ear from vibrating in response to sound waves. This lack of vibration leads to hearing loss that continues to get worse with time. The hearing loss is characteristically low-frequency, with higher frequencies being affected later as the disease progresses. Otosclerosis can lead to not only conductive hearing loss, but to nerve and sensory cell loss as well, causing a sensorineural hearing loss. In addition to hearing loss, some people with otosclerosis may experience dizziness, balance problems, or tinnitus.

Otosclerosis is the most frequent cause of middle ear hearing loss in young adults, and affects about 10% of the U.S. population. It is a disorder that gets worse slowly, usually beginning in early to mid- adulthood. It is more common in women than in men. Otosclerosis usually affects both ears. Risks include pregnancy (which may trigger onset) and a family history of hearing loss. Caucasians are more susceptible than others to Otosclerosis (PubMedHealth).*entnet.org

Otitis media: (more common in Children)Inflammation of the middle ear characterized by the accumulation of fluid,

bulging of the eardrum, pain in the ear and, drainage of purulent material into the ear canal (if the ear drum has ruptured). Otitis media is the most frequent diagnosis in sick children in the U.S., especially affecting infants and preschoolers. Almost all children have one or more bouts of otitis media before age 6.  Eustachian tube dysfunction, or inability to open appropriately and equalize pressure is a common cause of otitis media. In children, the eustachian tube is shorter than in adults and is positioned at an adverse angle for appropriate opening and ventilation.

Young children with otitis media may be irritable, fussy, or have problems feeding or sleeping. Older children may complain about pain and fullness in the ear. Fever may be present in a child of any age. These symptoms are often associated with signs of upper respiratory infection, with a runny or stuffy nose or a cough.

The buildup of fluid within the middle ear can cause pain and dampens the vibrations of the eardrum, which can create a temporary low-frequency hearing loss. The treatment for acute otitis media is antibiotics usually for 7-10 days. About 10% of children do not respond within the first 48 hours of treatment. Even after antibiotic treatment, 40% of children are left with some fluid in the middle ear which can cause temporary hearing loss lasting for up to 3-6 weeks. In most children, the fluid eventually disappears on its own.  Children who have recurring bouts of otitis media may have a pressure equalization tube placed into the ear to permit air pressure equalization that the Eustachian tube cannot provide.

Acoustic neuroma (tumor): (Adults)A benign tumor that may develop on the nerves near the inner ear affecting

hearing and balance. The tumor results from an overproduction of Schwann cells, which

5

Page 6: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

are small, sheet-like cells that normally wrap around nerve fibers and help support them. The abundance of Schwann cells press against the hearing and balance nerves, often causing gradual hearing loss, tinnitus, (ringing in the ears), and dizziness.  If the tumor becomes large, it can interfere with the (VII) facial nerve, causing partial paralysis, and eventually press against nearby brain structures, becoming life-threatening. The most common first indication of an acoustic neuroma is hearing loss, which is often accompanied by tinnitus. People with acoustic neuromas sometimes report difficulties in using the phone and difficulties in perceiving the tone of a musical instrument or sound even when their hearing appears to be otherwise normal. In most cases the hearing loss is initially subtle, but worsens gradually over time until deafness occurs in the affected ear. In approximately 10% of cases the hearing loss is sudden and severe. An acoustic neuroma is suspected in someone with unilateral hearing loss or hearing loss that is less severe in one ear than the other ear (asymmetrical).

Ossicular Discontinuity: (More common in women, all ages)As the conduction of sound from the outer ear to the inner ear is dependent on the

bones of hearing or ossicles, a disruption of the ossicles will result in conductive hearing loss.

In situations such as trauma or infection, any of the ossicles may be affected.In cases of severe head trauma, the connection between the incus and stapes, which is fragile, can be separated. In other cases, the incus bone itself is fractured producing a separation between the incus and the stapes.

With recurrent ear infections or in conditions such as cholesteatoma, the tip of the incus at its point of connection with the stapes is eroded resulting in a separation between the incus and stapes. With infection, the stapes bone itself can be eroded leaving only the platform by which it is in connection with the inner ear.

The conductive hearing loss that results from the lack of continuity of the ossicles can be surgically treated.

V. MASKINGMasking is defined as the process of introducing noise in the non-test ear (NTE)

to prevent it from responding to the test signal presented in the opposite test ear (TE). The types of noises used in masking include: narrow-band noise for pure tone audiometry and speech noise for speech audiometry. Masking is necessary whenever the interaural attenuation between the test ear and non-test ear is exceeded.

“Interaural attenuation” is the amount of sound damping/deadening (in decibels) that the bony and soft tissue between the cochleae of the left and right ears creates, allowing each ear to respond independently, without having to worry about a sound that is presented via an earphone to one ear actually crossing over to the opposite cochlea and being heard in the opposite or non-test ear. Another way to think about this is that the two cochleas are two “rooms” separated by a “wall.”  This “wall” is the interaural attenuation value (in decibels) between the two cochleas that is created by bone and soft tissue mass

6

Page 7: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

between the cochleas.  Interaural attenuation is the amount of sound isolation the “wall” creates so that you can raise your voice in one room without being heard in the room on the other side of the “wall.”

The dB level of a test signal in the left, test ear should be able to increase with no participation (vibration) from the non-test right ear; no crossover of the test signal to the non-test ear should take place. In other words, the level of the test signal should not exceed the interaural attenuation value for the test signal.  However, as the test signal is increased further, the non-test (contra-lateral) cochlea does begin to vibrate and respond to the signal supposedly being presented only to the test ear. This indicates that the interaural attenuation between the two cochleas has been exceeded and crossover of the test signal to the non-test ear is occurring.

Bone conduction is the primary physiological route for crossover of the test signal to non-test cochlea once the dB value of Interaural Attention is exceeded.

Bone Conductor Air Conductors Inserts

Interaural Attenuation Values in Air Conduction Testing

Conservative IA Estimates:

Frequency (Hz)

250 500 1000 2000 4000 8000

TDH 39/49 40 40 40 45 50 50

Insert ER-3A 40 50 60 60 60 60

Interaural attenuation (IA) varies according to type of earphone used and across individuals:

More IA for foam insert receiver (i.e. ER-3A) and thus crossover is less of a concern.

Less for supra-aural (i.e. TDH 39/49) receivers and thus crossover is more of a concern.

Interaural Attenuation Values in Bone Conduction Testing:

7

Page 8: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Theoretically, IA = 0 dB for all bone conduction stimuli.  When testing hearing using a bone conduction vibrator placed on the mastoid prominence behind the pinna, as soon as the skull starts vibrating with the presentation of the test signal, both cochleas are potentially vibrating and responding.  The cochlea with a better bone conduction threshold will respond, regardless of where the bone vibrator is placed (right or left mastoid prominence).

Masking Equations:

Assuming IA of inserts= 60 dB, headphones = 40 dB, and bone = 0 dBOcclusion Effect (OE) @ 250 Hz = 20 dB, @ 500 Hz = 15 dB, and @ 1000 Hz = 10 dBABG = Air-Bone-Gap, ASHA = American Speech-Language-Hearing Association

When to Mask:

Air Conduction (AC) Testing: ACTE - IA ≥ BCNTE

Bone Conduction (BC) Testing: ACTE - BCTE >10 dB

Minimum Masking Levels:

Air Conduction Testing:    

ACTE - IA + ABGNTE (ASHA) ACNTE + 15 (Clinician)

Bone Conduction Testing:

BCTE + ABGNTE + OE (ASHA) BCNTE + 15 + OE (Clinician)

Maximum Masking Levels:

Air or Bone Conduction Testing:

BCTE + IA - 5 (ASHA)

Determining Effective Masking Levels

Effective masking occurs when the masking noise in the nontest ear can be increased in 5 dB steps 3 times (15dB) without having to increase the level of the tone stimulus in the test ear. This level in the test ear represents the true threshold of the test ear.

When masking noise is used for pure tone air conduction and pure tone bone conduction threshold testing and word identification using speech stimuli, the masker

8

Page 9: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

noise is always presented to the non-test ear while the test stimulus (pure tones or speech) are presented to the test ear.

Masking noise is always presented via air conduction (even when testing using a bone conducted signal) and the accuracy of masked thresholds depends on the patient as well as the audiologist.

Masking noise presented to the non-test ear must always be greater than the air conduction threshold of that ear in order for the masking to be effective. If the masking noise level is set below the non-test ear's threshold, the patient will not hear the masking noise and the non-test ear will not be kept occupied, thus allowing the opportunity for the non-test ear to respond to the test signal.

A. Audiograms

An audiogram is a standard way of representing a person's hearing level. Most audiograms cover the limited range 250 Hz to 8 kHz, which is most important for clear understanding of speech, and plot the threshold of hearing relative to a standardized curve that represents 'normal' hearing. These are not the same as equal-loudness contours, which are a set of curves representing equal loudness at different levels in absolute terms measured in dB SPL.

Audiograms are set out with frequency in Hz on the horizontal axis on a logarithmic scale, and a linear dB HL scale on the vertical axis. Normal hearing is classified as being between -10 dB HL and 15 dB HL for children and -10 to 20 dB HL for adults. An audiogram can be obtained using a hearing test called audiometry. The test involves different tones being presented at a specific frequency and intensity. When the person hears the sound they raise their hand or press a button so that the tester knows that they have heard it. The lowest intensity sound they can hear is recorded and is referred to as a hearing threshold.

How often hearing should be tested depends mainly on noise exposure. People who are regularly exposed to hazardous noise should have their hearing tested once a year. People with healthy hearing and who are not exposed to much noise should have their hearing tested once every three years.

B. Patient History

Each pathology case in the program contains a patient history that allows the audiology student to help the patient more by making the diagnosis easier for the audiology student by narrowing down on certain diseases or ailments. Patient history files give the audiologist past symptoms and treatment plans that can be implemented into a future treatment plan or diagnosis plan.

C. Testing Procedures

9

Page 10: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Air Conduction Pure Tone Testing Procedures, No Masking:

1. Sit the patient in a chair that is positioned perpendicular to the audiometer.2. Explain to the patient what will occur during the test.  For example, the clinician

may tell the patient. “You are going to hear some sounds in either ear.  When you hear a beep, please raise your hand. Some of the sounds you may hear will be very faint, but try to respond when you think you hear it.”

3. Place the chosen earphones on the patient, being careful to use the red side for the right ear and the blue side for the left ear. If anything such as earrings or eyeglasses prevent the earphones from being placed snuggly on the patient's ears, ask the patient to remove them.

4. Begin with the right ear unless the left ear is already known to have better hearing.

5. Present a 1000 Hz tone at 40 dB in the better ear.  If there is no response to the tone, increase the tone to 50 dB. Raise the level of the tone in 10 dB increments until there is a response.

6. Once the patient responds to the tone, decrease the dB level by 10 dB until there is no response and increase the increase the dB level by 5 dB when there is no response.  Continue the down 10 dB, up 5 dB procedure until a response is indicated 3 times at one dB level. This level will be the threshold of hearing for that patient.

7. Record the threshold on the audiogram and proceed to test the next frequency. The recommended order of frequency presentation is as follows: 1000, 2000, 4000, 8000, 1000, 250, and 500 Hz.  Retest 1000 Hz in order to check the reliability of the results.

8. However, the order of the frequencies should be changed when the clinician is concerned that the patient will quickly become disinterested in responding (such is the case with children).  The recommended order of frequency presentation would then be:

2000 Hz Right Ear (RE) 2000 Hz Left Ear (LE) 500 Hz LE, 500 Hz RE 1000 Hz RE 1000 Hz LE 4000 Hz LE 4000 Hz RE 8000 Hz RE 8000 Hz LE 250 Hz LE 250 Hz RE

After presentation of four test frequencies, both high and low frequency data is obtained in both ears.

10

Page 11: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Air Conduction Pure Tone Testing Procedures with Masking:

If it is suspected that crossover may be occurring, follow the same procedures for Air Conduction Pure Tone Testing Without Masking in conjunction with the following steps:

1. Explain to the client that he/she will hear some noise in one ear but to ignore it and continue to listen for the beep and raise his/her hand accordingly.

2. Determine the minimum masking level using the masking equations.3. In the test ear, set the tone presentation level at the client's non-masked threshold

for the frequency being tested.4. In the non-test ear, set the masking noise at the minimum masking level

calculated in step 2.5. Present the tone in the test ear.6. If the client responds to the tone in the test ear, increase the masking level by 5dB

and keep the tone presentation level constant. If the patient does not respond, increase the tone in the test ear by 5dB and keep the masking noise at the same level.

7. Continue to repeat step 6 until a 20 dB plateau occurs. In other words, you must repeat step 6 until you have raised the masking level by 20 dB and the client continues to respond to the tone at a constant level in the test ear.

8. Record the client's masked threshold at that frequency and continue to test the other frequencies.

Bone Conduction Pure Tone Testing Procedures:

1. After instructing the patient in the same manner as for air conduction testing, place the bone oscillator on the mastoid process behind the pinna of the ear to be tested. Make sure that there are no obstructions, such as hair, between the bone oscillator and the mastoid process.

2. Follow the same procedures as for air conduction testing (with or without masking), yet only test the following frequencies: 500, 1000, 2000, and 4000 Hz.

Please be aware of the following when conducting pure tone testing:

Do not present the tones is a rhythm. The patient may recognize a rhythm and respond even when a tone has not been presented because he/she predicted a tone to be present.

Do not exceed a level of 110 dB HL for any tone, even if the patient has not responded to a tone at 100 dB HL.

If a patient does not respond in a timely manner after the tone presentation, test that tone again because the patient may not have heard the tone and just be falsely responding.

11

Page 12: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

D. Plateau Method

The plateau method is a way of determining the patient’s threshold while using masking. The basic idea behind it is that as long as the pure-tone threshold increases as the masking noise level is increased, the tone and the noise are being heard in the same ear.  When the level of the masking noise can be increased without increasing the threshold for the tone, the tone is being heard in the TE and the noise is being heard in the NTE, hence, the true threshold of the tone is found.

The following steps are involved:

1. Determine whether masking is necessary.2. Determine the minimum masking level necessary.3. Present the masking noise to the NTE at the minimum masking level.  Present the

tone at the level you measure as the threshold in quiet.4. If there is a response, increase the level of the masking noise by 5 dB.  Present the

tone at the same level.5. If there is no response, increase the level of the tone in 5 dB steps until a response

is obtained.6. Repeat these two steps until you can increase the masker by 20 dB or more

without increasing the threshold of the tone.  The level of the tone is the true threshold of the TE.

Central Masking

By simply introducing masking noise into the non-test ear without over masking, a shift in threshold of 5 to 10 dB may occur.  This is thought to be due to some yet unknown central nervous mechanisms such that the noise presented to the NTE is interfering in the ability of the TE to hear the tone. The shift in threshold is neither due to overmasking nor to crossover.

Masking DilemmaWhen the minimum amount of masking may cause overmasking.  In these cases,

it may not be possible to determine masked thresholds.  Other techniques may be needed to determine the degree and type of loss of each ear.  It is often a concern in patients who have a bilateral conductive hearing loss.

OvermaskingOvermasking refers to when the masking level in the non test ear is such that it

exceeds the interaural attenuation and can cross over to the test ear, thus possibly impeding the test ear's ability to hear the stimulus.

VI. Project Basics

12

Page 13: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

A. Getting Started with Open Source

Step 1 – Developer Registration

1. Go to https://sourceforge.net/account/registration/ and register a new account at SourceForge.net

a. If you are already a member of the SourceForge community then a new registration for EPICS is NOT required. You may use your existing SourceForge.net account. Skip to step 2

b. Note that first and last names are NOT necessary. Fill in all required fields. You may use any E-Mail address you are comfortable with

c. Remember to uncheck mailing-list options if you do not wish to receive them

d. Click Register Nowe. Visit the email address you supplied, open the registration E-Mail sent by

the automated SourceForge registration server, and follow the link provided to activate your SourceForge account

f. You are now registered to SourceForge.net2. Request to become a member of the Virtual Masking Lab developers

a. Give your SourceForge.net login name to an administrator to add you to the list of developers

b. If you do not personally know an administrator (I.E. all previous members of Virtual are no longer on the project) then follow parts c through g

c. Login to SourceForge.net using the account you created in step 1d. Navigate to http://sourceforge.net/projects/virtualmaskingl/develop e. Click on the Send a request to join this project linkf. Click on the E-Mail address of an administratorg. Specify that you are a member of EPICS-SLAC Virtual Project and your

name for verification

Note to EPICS Administrators:

SourceForge.net is a community effort to develop a program. You should not deny anyone development permissions to the virtual project that could provide major contributions to the project just because they are not a member of EPICS. Consider outside requests to join, but only provide extensive permissions to those who are members of the Virtual Project

3. Add new members to the projecta. Login to SourceForge.net using your administrative accountb. Navigate to Project Admin -> Membersc. Type the login name of the user to add as a developerd. Click Add Member and then click the name in the Permissions for

Existing Project Members liste. Set appropriate Permissions and Project Roles for the new member

13

Page 14: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Step 2 - Source Control

How to use Virtual Masking Lab source control on SourceForge.net

1. Download and Install AnkhSVN from http://ankhsvn.open.collab.net/downloads a. Registration is NOT required if you click the Skip registration and

download the software button on the download page.2. Ensure AnkhSVN is selected as Visual Studio source control by:

a. Select Tools -> Optionsb. On the right, under Source Control select Plug-in Selectionc. For Current source control plug-in, ensure AnkhSVN – Subversion for

Visual Studio is selected

3. Add Virtual Masking Lab to the Repository Explorera. In Visual Studio select View -> Repository Explorerb. Click the Add a new URL to the Repository Explorer  iconc. Specify the following URL and click OK:

https://virtualmaskingl.svn.sourceforge.net/svnroot/virtualmaskingl/Virtual_Lab/

14

Page 15: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Step 3 – Bugs & Features Tracking

1. Reporting a bug or requesting a featurea. Navigate to http://sourceforge.net/projects/virtualmaskingl/developb. Hover the mouse over the Tracker link and select Bugs or Feature

Requests.c. The page will default to Browse. Select Add Newd. Select an appropriate Categorye. Provide a brief summaryf. For the description, be as detailed as possible. For bugs include any

applicable error messages and a procedure to reproduce the bug. Flawed logical operation constitutes a bug. For features, be as specific as necessary to convey your idea.

15

Page 16: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

g. If there are applicable concept files, screenshots or any other resources, attach them and provide a description

h. Click the Add Artifact buttoni. Your bug or feature request has been submitted for review by the

developersj. You may return to this bug or request to check on the status and/or submit

a comment2. Reviewing a bug or feature request

a. Ensure you have Technician status in the Bugs and Feature Requests trackers given to you by the administrators

b. Perform parts a and b of step 1 to navigate to the Bugs or Feature Requests tracker

c. Ensure you are in the Browse aread. Click on the bug or feature you would like to reviewe. Set particular fields to adequately assess the urgency of the bug or feature

and/or assign the feature to a developerf. If the bug has been fixed or feature has been implemented, provide a brief

description and close the ticket3. Open the Virtual Masking Lab solution in Visual Studio:

a. In the Repository Explorer left pane,  select the Virtual_Lab folder under svnroot/virtualmaskingl/

b. Select the file Virtual_Lab.sln from the files on the right pane

c. Click the Open icond. Ensure the Type is set to Latest Version and specify a local path from

which to work with the Virtual Masking Lab solution (The default should suffice) and click OK

e. Allow a moment for the project to downloadf. You are now ready to begin modifying the codeg. To load the project in the future just reload the local copy and update it

using the SVN4. Once you have finished modifying a source file, it must be Committed to update

the source code on SourceForge.net so that other developers may use the new revision

a. If the Pending Changes window is not shown in Visual Studio, navigate to View -> Pending Changes

b. Click the Update button to ensure your files have the latest changes made by another developer. If a conflict should arise, see step 6 to resolve the conflict

c. From the list of files that you have made changes too, ensure the files you wish to commit are checked, and UNcheck the files that you DO NOT wish to commit.

d. In the text box above the list of files, type a short message that specifies the changes you have contributed to the project.

e. Click the Commit buttonf. Your modifications are now available to other developers

16

Page 17: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

5. If two developers modify the same lines of code in a file and the other developer commits before you do, a conflict arises and it must be resolved before your changes can be committed.

a. Right Click the conflicting file in the Pending Changes window and navigate to Resolve

b. The list of options should be self explanatory.i. The Resolve Conflict option will allow you to personally make the

appropriate changes necessary to adapt your changes with the other developers committed changes.

ii. The Using Original File option will revert any changes back to the previous revision prior to the changes you or the other developer made

iii. The Using My (Their) File option will resolve the conflict with only your (their) changes.

c. Once the conflict has been resolved you may commit your changes.d. For more information on AnkhSVN operations, visit

http://help.collab.net/index.jsp?topic=/com.collabnet.doc.anksvn_001/action/ankh_getting_started.html

Step 4 – Preparing a Release

When the Virtual Masking Lab program is working as expected, all of the major bugs have been fixed and it is desired to release it to the public, follow these steps to ensure standardization of releases.

1. Prepare Visual Studio for a release builda. Right click anywhere on the menu bar to bring up the Toolbars menu.b. Ensure Standard is selectedc. In the Solution Configuration dropdown box, choose Release and ensure

Solution Platforms is set to Any CPU

2. Remember to change the Solution Configuration back to Debug prior to debugging the program

3. The project is now ready to build a release4. Update applicable version numbers

a. Version numbers should follow the format #.#.#i. The first # is the major build number. Major overhauls in interface

and features that significantly change the feel of the program constitutes this value to be incremented

ii. The second # is the minor build number. Addition of features or overhauls of internal code that does not significantly impact the operation of the program but instead implements several bug fixes constitutes this value to be incremented

17

Page 18: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

iii. The third # is the revision number found in the View -> Pending Changes window next to the caption Updated to: seen after performing an update PLUS 1 (25 for this example. See notes)

b. See the notes following this step for additional version informationc. Once the version number is determined, navigate to View -> Solution

Explorer and select the VML Setup projectd. Right click VML Setup and select Propertiese. For Output File Name, change the string to Release\

VML_#.#.#_Setup.msi where #.#.# is the version number determined in part a and click OK

f. With VML Setup still selected in the Solution Explorer, navigate to View -> Other Windows -> Properties Window

g. In the Properties window, change the Version value to the version number determined in part a

h. Click Yes to the resulting dialog box to allow the ProductCode to change. This will allow for a user with Virtual Masking Lab already installed to overwrite their current installation with the new version.

i. In the Solution Explorer navigate to the AboutVML.cs window design.j. Change the version number on the window to the version number

determined in part ak. All appropriate version information is now updated and the program is

ready for deployment

NOTE: By changing the VML Setup configuration, your next commit will result in incrementing the revision number. This results in the next revision number given by Update to:

NOTE: The second and third # in the version number may be greater than 9. Revisions should always get larger and never return to 0. The minor number should return to 0 when the major version number is incremented.

5. Build and deploy the new releasea. Navigate to Build -> Rebuild Solutionb. Once building is complete, navigate to your project file directory to

Virtual_Lab\VML Setup\Release\c. Run the installation and the resulting program to ensure the proper version

has been installed

18

Page 19: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

d. On SourceForge.net navigate to https://sourceforge.net/projects/virtualmaskingl/files/Releases/

e. Click the Add File button and click Browsef. Navigate to the same folder in part bg. Select the new release .msi file and click OK and then Uploadh. Once the file is finished uploading, click Donei. Back in the SourceForge.net file browser, find the version that was just

uploaded and click the information icon on the far rightj. Under Default Download For: check the checkbox next to the Windows

Icon k. Click the Save buttonl. The new version is now successfully deployed

B. Introduction to C# and Visual Studio .NET

1. Variablesa. Definition

i. Used to temporarily store values during the execution of an application

ii. Variables have a name (refers to the value the variable contains)iii. Variables have a data type (determines the kind of data the variable

can store)b. Declarations

i. To declare a variable is to tell the program about it in advance1. type variablename;

ii. Variables declared within a method:1. Exist only as long as the method is executing2. The value of a variable in a procedure is local to that

procedure, that is, you can’t access a variable in one method from another method

c. Examplesi. Declare an integer variable

int myint;

ii. Define the variable (give it a value)

int myint;myint = 3;

Or…

int mying = 3;

19

Page 20: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

2. Operatorsa. Arithmetic

+ Add– Subtract* Multiply/ Divide

b. Logical

&&  (and), ! (not), || (or)  - - - - used in bool

c. String Concatenation

myString = string1 + string2;

3. Decision Statementa. If…Then…Else Statement

int myint = 3;if (myint ==3)( MessageBox.Show(“Your Variable is 3”);)else( MessageBox.Show(“myint isn’t 3”);)

4. Loopsa. While Loop

i. Allows us to repeat statements

int myint = 0;while (myint < 3)( //…do something here myint++;)

b. For Loop

for (int myint = 0; myint < 3; myint++)( //…do something here)

20

Page 21: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

5. Visual Studio .NET Introa. Windows and its applications are driven by events – a form opens, a key is

pressed, a button is clicked.b. When an event occurs the system detects it and responds to it.c. To make an application respond to user action or system events, you write

code for your form and controls

C. C# and Visual Studio .NET Skill Session

*This is an example of what you can do with C#

Weight Converter: Your First C# Program

The Windows-based application you’re going to construct is Weight Converter, a simple program to take a value in pounds and output the same weight in kilograms. This program has a simple user interface and can be created and complied in just a few minutes using Visual Studio.NET. Here’s what your program will look like when it’s finished:

Programming Steps

The user interface contains two command buttons, two, textboxes, and two labels. These elements were produced in the program by creating six objects on the Main form and then changing several properties for each object. After the interface was designed, program code for the Convert and Close command buttons was added to the program, you’ll follow three essential programming steps: creating the user interface, setting the properties, and writing the program code to perform input, processing and output. The process is summarized in the table below:

Programming Step Number of Items1. Create the user interface. 6 objects2. Set the properties. 14 properties3. Write the program code. 2 event methods

Creating the User Interface

21

Page 22: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

The following steps will be completed using Microsoft Visual Studio. NET 2005. To begin, open Visual Studio. NET and follow the instructions below.

1. On the File menu, click NEW->PROJECT. Choose Windows Application under C# Project types. Type a name for your program and chose a location to save the project.

2. Click OK to create a standard 32-bit application.

Visual Studio.NET displays in the center of the screen a blank form where you can build your user interface.

Setting the Main Form Properties

3. After resizing the form as needed, it’s best to set the form properties. Click to select the form and then modify the properties of the form. If you can’t see the properties window in the lower-right, choose VIEW->PROPERTIES WINDOW. Set  the properties of the main form to match those below:

(Name) frmMainFormBorderStyle FixedSingleMaximizeBox FalseStartPosition CenterScreenText Weight Converter

22

Page 23: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

4. Before adding the buttons and textboxes, click on frmMain and make sure you can see the toolbar on the left-hand side of the screen. If it’s not there, choose VIEW->TOOLBOX from the menu.

Button Control

5. Click the Button control in the toolbox, and then place the mouse pointer over the form.

Once the Button control is selected, the mouse pointer changes to crosshairs when it rests on the form. Simply click on the form to create an appropriately sized button. Alternatively, you may also drag the Button from the toolbox onto the form.

Try creating your first button now.

6. By default, the button is named button1. Click to select the button on the form and then modify the properties of the button. If you can’t see the properties window in the lower-right, choose VIEW->PROPERTIES WINDOW. Set the properties of thebutton1 to match those below:

(Name) btnConvertText Convert

7. Follow the same process outlined in steps 5-6 to create another button named btnClose, with the Text of Close.

Adding Textboxes and Labels

8. Textboxes and labels can be added to your form by dragging a TextBox control or Label control from the toolbox onto the main form.

23

Page 24: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

9. Change the properties for each of the textboxes created so that the (Name) of the topmost textbox is txtPounds and the (Name) of the second textbox is txtKilograms. Since the user will only be entering data in the first textbox, we can also set the READONLY property of txtKilograms to True.

10. Follow the same procedure in steps 8-9 to create two labels on the form, setting the Text property of the topmost label to Pounds, and the Text property of the second label to Kilograms:

Writing the Code

Now you’re ready to write the code for the program. Because most of the objects you’ve created already ”know” how hard to work when the program runs, they’re ready to receive input from the user and process it automatically. The inherent functionality of objects makes creating functional user interfaces easy-once objects are placed on a form and their properties are set, they’re ready to run without any additional programming. However, the logic that performs the weight conversion calculation is still missing from the program. Because the program is driven by the Convert and the Close buttons, you’ll associate code with those buttons.

The Close Button

Event Methods for buttons can be created easily in Visual Studio.NET, by simply double-clicking on the appropriate button. On your main form, double-click on the Close button. Visual Studio will take you to the code window for your form and automatically create a btnClose_Click event method:

24

Page 25: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Type the following command inside the btnClose_Click event method:

That’s it! Now when you run your program (press F5 or choose DEBUG->START) and click the Close button, the form will close.

The Convert Button

All of the logic for the program will be coded inside the convert button. The code inside this event method should read from the txtPounds textbox, perform a calculation on the value to convert it to kilograms (multiply it by 0.45) and then display the result in the txtKilograms textbox.

Create the event method for the Convert button by returning to your main form and double-clicking on the Convert button.  Now you’ll be able to insert the code shown below.

Let’s start with reading in the user input from the txtPounds textbox. Since we’ll be performing a calculation with the input, we should read it in and store it as an int. Note that we’ll actually be getting the user input from the Text property of the textbox. Code to accomplish this is shown below:

The Parse method actually reads a string from the textbox and converts it to an integer, which we store in the pounds variable.

25

Page 26: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

After we have the weight in pounds, it’s time to perform the calculation and store the result:

Note that we store the result in a double. This is because we won’t likely have a whole number after multiplying the pounds*0.45. The final step is to display the result in the textbox.

The line above converts the variable kilograms to a string and stores that string in the txtKilograms textbox. The result should now be visible to the user. Here’s a look at the complete method:

Press F5 or choose DEBUG->START to run your program.

Adding to the Program

Inside the btnConvert_Click method you could add some error checking to ensure that users only enter positive values for their weight (e.g. values >0). If a negative number is entered, the program can display a message and set the focus to the txtPounds textbox. The code to accomplish this is below:

Now the only trick is to figure out where to put the code! That is left as an exercise for the reader, but here’s a hint: the btnConvert_Click method receives input, performs

26

Page 27: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

processing (calculations) and generates output. The “validation” step should go between two of these steps.

Event Method Code

D. Core C# and .NET Quick Reference

1. Data Types

Primitive Size Example

string 2 bytes/char s = “reference”;

bool b = true;

char 2 bytes ch = ‘a’;

byte 1 byte b = 0x78;

short 2 bytes lval = 54;

int 4 bytes lval = 540;

long 8 bytes ival = 5400;

27

Page 28: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

float 4 bytes val = 54.0F;

double 8 bytes val = 54.0D;

decimal 16 bytes val = 54.0M;

2. Arrays

Declarationint[] numArray = {1903, 1907, 1910};int[] numArray = new int[3];// 3 rows and 2 columnsint[ , ] nums = {{1907, 1990}, {1904, 1986}, {1910, 1980}};

Array OperationsArray.Sort(numArray);   // sort ascending// Sort begins at element 4 and sorts 10 elementsArray.Sort(numArray,, 4,10);// Use one array as a key and sort two arraysstring[] values = {“Cary”, “Gary”, “Barbara”};string[] keys = {“Grant”, “Cooper”, “Stanwyck”}’Array.Sort(keys, values);// Clear elements in array (array, 1st element, # elements)Array.Clear(numArray, 0, numArray.Length);// Copy elements from one array to anotherArray.Copy(src, target, numelements);

3. String Operations

Method Description

Compare Sting.Compare(stra, strb, case, ci)  bool case – true for case insensitive  ci – new CultureInfo(“en-US”)returns: <0 if a<b, 0 if a=b, 1 if a>b

IndexOf str.IndexOf(val, start, num)val – string to search forstart – where to begin in stringnum – number of chars to searchreturns (-1) if no match.

LastIndexOf Search from end of string.

Replace newstr = oldstr.Replace(“old”,”new”);

28

Page 29: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Split Char[] delim = {‘ ‘, ‘,’};string w = “Kim, Joanna Leslie”;// create array with three namesstring[] names = w.Split(delim);

Substring mystring.Substring(ndx, len)sting alpha = “abcdef”;// returns “cdef”string s = alpha.Substring(2);// returns “de”s = alpha.Substring(3,2);

ToCharArray

Places selected characters in a string in a char array;String vowel = “aeiou”;// create array of 5 vowelschar[] c = vowel.ToCharArray();// create array of ‘i’ and ‘o’.char[] c = vowel.ToCharArrary(2,2);

4. System.Text.StringBuilder

ConstructorStringBuilder sb = new StringBuilder ();StringBuilder sb = new StringBuilder(mystring);StringBuilder sb = new StringBuilder(mystring,capacity);

  mystring – initial value of StringBuilder object  capacity – initial size (characters) of buffer.

Using StringBuilderMembersdecimal bmi = 22.2M;int wt = 168;StringBuilder sb = new StringBuilder(“My weight is “);sb = sb.Append(wt); // can append numbersb = sb.Append(“ and my bmi is “).Append(bmi);// my weight is 168 and my bmi is 22.2sb = sb.Replace(“22.2”,”22.4”);string s = sb.ToString();// Clear and set to new valuesb.Length=0;sb.Append(“Xanadu”);

5. DateTime and TimeSpan

DateTime Constructor

29

Page 30: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

DateTime(yr, mo, day)DateTime(yr, mo, day, hr, min, sec)

DateTime bday = new DateTime(1964,12,20,11,2,0);DateTime newyr = DateTime.Parse(“1/1/2005”);DateTime currdt = DateTime.Now;// also AddHours, AddMonths, AddYearsDateTime tomorrow = currdt.AddDays(1);TimeSpan diff = currdt.Subtract(bday);// 14795 days from 12/20/64 to 6/24/05Console.WriteLine(“{0}”, diff.Days);

//TimeSpan(hrs, min, sec)TimeSpan ts = new TimeSpan(6, 30, 10);// also FromMinutes, FromHours, FromDaysTimeSpan ts = TimeSpan.FromSeconds(120);TimeSpan ts = ts2 – ts1; //+,-,>,<,==,!=

6. Formatting Numeric and Date Values

Format Item Syntax:   {index[,alignment] [:format string]}index = Specifies element in list of values to which format is appliedalignment = Indicates minimum width (in characters) to display value.format string – Contains the code that specifies the format of the displayed value.Example: String.Format(“Price is: {0:C2}”, 49.95); // output: Price is: $ 49.95

a. Numeric Formatting

Format Specifier Pattern Value Description

C or c {0:C2}, 1388.55 $ 1388.55 Currency.

D or d {0:D5}, 45 00045 Must be integer value.

E or e {0,9:E2}, 1388.55 1.39+E005

Must be floating point.

F or f {0,9:F2}, 1388.55 1388.55 Fixed Point representation.

N or n {0,9:N1}, 1388.55 1,388.6 Insert commas.

P or p {0,9:P3}, 7865 78.650% Converts to percent.

R or r {0,9:R}, 3.14159 3.14159 Retains all decimal places.

X or x {0,9:X4}, 31 001f Converts to Hex

30

Page 31: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Example: CultureInfo ci = new CultureInfo(“de-DE’);   // German culture               string curdt = String.Format(ci,”{0:M}”,DateTime.Now); // 29 Juni

b. DateTime Formatting: (January 19, 2005 16:05:20) en-US

Format

Value Displayed Format Value Displayed

d 1/19/2005 Y or y January, 2005

D Wednesday, January 19, 2005 t 4:05 PM

f Wednesday, January 19, 2005 4:05:20 PM

T 4:05:20 PM

F Wednesday, January 19, 2005 4:05 PM

s 2005-01-19T16:05:20

g 1/19/2005 4:05 PM u 2005-01-19 16:05:20Z

G 1/19/2005 4:05:20 PM U Wednesday, January 19, 2005 21:05:20PM

M or m January 19

7. Using the System.Text.RegularExpressions.Regex class

string zipexp = @”\d{5}((-|\s)?\d{4})$”;string addr=”W.44th St, New York, NY 10017-0233”;Match m = Regex.Match(addr,zipexp); // Static methodRegex zipRegex = new Regex(zipexp);m = zipRegex.Match(addr); // Use Regex ObjectConsole.WriteLine(m.Value); //10017-0233

Pattern Description Example

+ Match one or more occurrence ab+c matches abc, abbc

* Match zero or more occurrences ab*c matches ac, abbc

? Matches zero or one occurrences ab?c matches ac, abc

\d \D Match decimal digit or non-digit (\D) \d\d matches 01, 55

31

Page 32: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

\w \W Match any word character or non-char \w equals [a-zA-Z0-9_]

\s \S Match whitespace or non-whitespace \d*\s\d+ matches 246 98

[ ] Match any character in set [aeiou]n matches in, on

[^ ] Match any character not in set [^aeiou] matches r or 2

a | b Either a or b jpg|jpeg|gif matches .jpg

\n \r \t New line, carriage return, tab

8. Using the C# Compiler at the Command Line

C:\>csc /t:library /out:reslib.dll mysource.cs     csc /t:winexe /r:ctls1.dll /r:ctls2.dll winapp.cs     csc /keyfile:strongkey.snk secure.cs

Options Description

/addmodule Import metadata from a file that does not contain a manifest

/debug Tells compiler to emit debugging info

/doc Specifies an XML documentation file to be created during compilation

/keyfile Specifies file containing key used to create a strong named assembly

/lib Specifies directory to search for external referenced assemblies

/out Name of compiled output file

/reference (/r) Reference to an external assembly

/resource Resource file to embed in output

/target (/t) /t:exe /t:library /t:module /t:winexe

9. C# Language Fundamentals

Control Flow Statements

switch (expression){ case expression:  // statements  break / goto / return()

switch (genre){  case “vhs”:     price= 10.00M;

32

Page 33: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

case …default:  // statements  break / goto / return()}expression may be integer, string, or enum.

     break;  case “dvd”:     price= 16.00M;     break;  default:     price= 12.00M:     break;}

if (condition) {  // statements} else {  // statements}

if (genre==”vhs”)  price= 10.00M;else if (genre==”dvd”)  price= 16.00M;else price= 12.00M;

Loop Construction

while (condition){ body }

while ( ct < 8){ tot += ct; ct++;}

do { body }while (condition);

do { tot += ct; ct++;}while (ct < 8);

for (initializer;     termination condition;     iteration;){   // statements }

for (int i=0;i<8;i++){     tot += i;}

foreach (type identifier in collection){   // statements }

int[] ages = {27, 33, 44};foreach(int age in ages){   tot += age; }

10. C# Class Definition

Class

[public | protected | internal | private][abstract | sealed | static]class class name  [:class/interfaces inherited from]

Constructor

[access modifier] class name (parameters) [:initializer]

initializer - base calls constructor in base class.                this calls constructor within class.

33

Page 34: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

     public class Shirt: Apparel {        public Shirt(decimal p, string v) : base(p,v)        { constructor body }

Method

[access modifier][static | virtual | override | new | sealed | abstract ]method name (parameter list) { body }

  virtual - method can be overridden in subclass.  override - overrides virtual method in base class.  new - hides non-virtual method in base class.  sealed - prevents derived class from inheriting.  abstract - must be implemented by subclass.

Passing Parameters:a. By default, parameters are passed by value.b. Passing by reference: ref and out modifiers

     string id= “gm”; // caller initializes ref     int weight;         // called method initializes     GetFactor(ref id, out weights);     // … other code here     static void GetFactor(ref string id, out int wt)     {        if (id==”gm”) wt = 454; else wt=1;        return;     }

Property

[modifier] <datatype> property name {public string VendorName{     get { return vendorName; }     set { vendorName = value; } // note value keyword}

11. Delegates and Events

Delegates  [modifiers] delegate result-type delegate name ([parameter list]);

  // (1) Define a delegate that calls method(s) having a single string parameter

34

Page 35: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

  public delegates void StringPrinter(string s);  // (2) Register methods to be called by delegate  StringPrinter prt = new StringPrinter(PrintLower);  prt += new StringPrinter(PrintUpper);  prt(“Copyright was obtained in 2005”); // execute PrintLower and PrintUpper

Using Anonymous Methods with a DelegateRather than calling a method, a delegate encapsulates code that is executed:

  prt = delegate(string s) { Console.WriteLine(s.ToLower()); };  prt += delegate(string s) { Console.WriteLine(s.ToUpper()); };  prt(“Print this in lower and upper case.”);

Events  // class.event += new delegate(event handler method);  Button Total = new Button();  Total.Click += new EventHandler(GetTotal);  // Event Handler method must have signature specified by delegate  private void GetTotal( object sender, EventArgs e) {

Commonly used Control Events

Event Delegate

Click, MouseEnterDoubleClick, MouseLeave

EventHandler( object sender, EventArgs e)

MouseDown, MouseUp,MouseMove

MouseEventHandler( object sender, MouseEventArgs e)e.X, e.Y - x and y coordinatese.Button - MouseButton.Left, Middle, Right

KeyUp, KeyDown KeyEventHandler(object sndr, KeyEventArgs e)e.Handler - Indicates whether event is handled.e.KeyCode - Keys enumeration, e.g., Keys.Ve.Modifiers - Indicates if Alt, Ctrl, or Shift key.

KeyPress KeyPressEventHandler(object sender, KeyPressEventArgs e)

12. struct

[attribute][modifier] struct name [:interfaces] {struct-body}

Differences from class:- is a value type

35

Page 36: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

- fields cannot have initializer- cannot inherit from a class or be inherited- explicit constructor must have a parameter

13. enum (Enumerated Type)

enum enum Operations

enum Fabric: int {     cotton = 1,     silk = 2,     wool = 4,     rayon = 8}

int cotNum = (int) Fabric.cotton; // 1string cotName = Fabric.cotton.ToString(); //cottonstring s = Enum.GetName(typeof(Fabric),2); //silk// Create instrance of wool enum if it is validif(Enum.IsDefined(typeof(Fabric), “wool”) Fabric woolFap     = (Fabric)Enum.Parse(typeof(Fabric,”wool”);

VII. Virtual Project Tutorials

A. Creating New Graphics

We created all new patient images along with button(call) icons that are placed in the upper corners of the patient window to signify which ear(left or right) and what type of masking is presently used on the patient(ear plugs, bone transducers, or headphones). The process for uploading and creating images from scratch (pencil drawings) includes:

1. Draw images of each patient with arm in each position (ideally around 4 or 5 positions)

2. Either scan pictures in or take a photo and upload to photoshop, where the original photo or scan can be used as a removable background layer and trace using the tools in photoshop, creating separate file for each arm position

3. Crop images and flip arms in each position to create both left and right raised arm image sets by using the transform pull down and clicking reflection

4. Add color and export each image as a .png file5. Import all images into Flash library6. Create separate layers for each patient, arm, and speed (i.e.  Man Left Fast,

Woman Right Slow etc.)7. Export each layer individually as .gif files8. Those .gif files can then be placed in the programming code9. Total of 16 files for 4 patients with 2 speeds and 2 arms10. Same instructions apply for non patient images minus the extra instructions for

different speeds and left and right arms.

Maximum Audiometer OutputBone Output Insert Output Phone

36

Page 37: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Output250 55 90 105500 65 110 120

1000 75 115 1202000 80 115 1203000 75 115 1204000 85 115 1206000 50 100 1208000 45 90 105

With Masking on Channel 2Bone Output Insert Output Phone

Output250 55 100 105500 70 110 120

1000 80 115 1202000 85 115 1203000 85 115 1204000 90 115 1206000 55 100 1208000 50 85 105

Pathology Ranges*BC only tested at 250, 500, 1000, 2000, and 4000 Hz.*Bilateral- both ears with pathology that vary by +/- 10 dB between ears.*Unilateral- one ear with pathology, one ear normalNormal Hearing

AC and BC within -10 to 25 dB AC and BC for a specific freq must be within 10 dB of each other. BC value

will be a lower or equal numerical value as the AC. (BC≤ AC) Consecutive freqs are no more than 10 dB apart for AC and BC.

*Otitis Media can have a low freq loss or a flat lossOtitis Media (Low freq loss)

Max AC 60 dB for 250 and 500 Hz. Max AC for 1000-8000 Hz within normal hearing range (see above) Max BC 25 dB for all freqs AC and BC for 250 and 500 Hz must be 15 dB or more apart. AC and BC within 10 dB of each other for a given freq for freqs 1000-8000 Hz Drop between 500 and 1000 Hz 20-40 dB difference.

Otitis Media (Flat loss)

37

Page 38: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Max AC 60 dB for all freqs Max BC 25 dB for all freqs AC and BC must be at least 15 dB apart at each freq across all freqs Consecutive freqs within 10 dB for both AC and BC

Otosclerosis (bilateral) BC Thresholds< 15 dB except for a threshold= 20-30 dB @ 2 k Hz AC thresholds 30-60 dB. Consecutive frequencies must be within 5 dB. Loss

is relatively flat: 250 and 8k should be within +/-10 dB. AC and BC must be 15 dB or greater apart (except @ 2Khz should be within

10 dB).

Otoslcerosis (Low freq loss) BC Thresholds< 15 dB except for a threshold= 20 dB @ 2 k Hz AC thresholds 25-60 dB. Consecutive frequencies must be within 5 dB. 250

and 500 Hz must be below all other AC threshold levels. 500 should be 10-20 dB below 1kHz.

AC and BC must be 15 dB or greater apart.

Ossicular Discontinuity All BC within normal range (see above) Consecutive freqs are no more than 10 dB apart for BC. AC 30 -60 dB. Must be 15 dB or greater from BC at each freq

Microtia with Atresia *Name Change! (This is the same config as Ossicular Discontinuity and Flat Otitis Media. Case Hx different)

All BC within normal range (see above) Consecutive freqs are no more than 10 dB apart for BC. AC 30 -60 dB. Must be 15 dB or greater from BC at each freq

Presbycusis AC and BC for a specific freq must be within 10 dB of each other. BC value

will be a lower or equal numerical value as the AC. (BC≤ AC) 250 and 500 Hz @ 10-40 dB. 250 and 500 Hz are within +/-5 dB. From 500 Hz, consequent frequencies must become higher in numerical

value, ranging from differences from 5 dB to 20dB between consecutive freqs. Acceptable range for 1000-8000 Hz is 45 dB to limits of audiometer.

Right and Left ears +/-5 dB at all freqs for AC and BC

Acoustic Tumor (8 th nerve tumor)

38

Page 39: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

AC and BC for a specific freq must be within 10 dB of each other. BC value will be a lower or equal numerical value as the AC. (BC≤ AC)

Normal hearing through 1000 Hz (see above) From 1000 Hz, consequent frequencies must become higher in numerical

value, ranging from differences from 5 dB to 20dB between consecutive freqs. Acceptable range for 2000-8000 Hz is 30 dB to limits of audiometer.

Meniere’s Disease One ear normal hearing AC and BC within 5 dB of each other at each freq for all freqs BC< AC Range 40-90 dB Consecutive freqs within +/-10 dB 8k and 250 Hz should be within 15dB of each other (flat loss)

Noise Induced Trauma AC and BC within 10 dB of each other at each freq for all freqs BC≤ AC 250-2000 Hz normal hearing (see above) 4000 Hz 20-50 dB drop from 2000 Hz 8000 Hz 10-20 dB higher (lower numerical value) than 4000 Hz Right and Left ears +/-10 dB for 250-2000 Hz. 4000-8000 Hz +/-20 between

ears (Distance between ears at 4000, must be the same at 8000)

Randomization Process

A. Normal Hearing RandomizationThe motivation behind the need for a normal hearing pathology within the program stems from the concept that everyone with a hearing disorder had, or could have had, normal hearing at some point before the disorder. Therefore, all other pathologies will take a randomly generated normal hearing pathology and modify it to match the particular pathology.The normal hearing randomness must adhere to the following guidelines:

AC (Air Conduction) between two neighboring frequencies must be within 10 dB

BC (Bone Conduction) between two neighboring frequencies must be within 10 dB

AC must be within 10 dB of BC for the same ear and frequency BC must not exceed AC for the same ear and frequency

39

Page 40: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

BC @ Hz for Ear 0

BC @ Hz for Ear 1

AC @ Hz for Ear 1

AC @ Hz for Ear 0

?No

Yes EndDiagram 1 – Sequence of value determination

BC between both ears for the same frequency must be within + or – 5 dB (IA approx. 0)

AC for both ears at the same frequency must be within 10 dB All values must fall in between the range of -10 and 25 dB

As long as these guidelines are followed, it does not matter which ear is considered left and right; this decision is given to the pathology generators to decide. To stick with understanding the programming process (0 based indexing in an array), ears will be considered Ear 0 and Ear 1. The distinction between BC and AC will be given an index value as well: 0 for BC, 1 for AC. Also, the frequency must also be indexed properly. C# does not allow the programmer to define indexes such as 250, 500, 1000, etc. without first allocating the memory up to the desired index number. Therefore index 0 will refer to 250, 1 for 500, 2 for 1000, etc. The formula to convert the index to the actual frequency is:

f =250∗2i

where f is the frequency and i is the array index.The first step taken toward achieving this goal was to produce an order in which each value will be determined. The order is given in the diagram below.

Although the diagram holds for all values, the first 4 data points (BC and AC for both ears at 250 Hz) do not depend on values of previous frequencies; they only depend on each other. Therefore they are determined prior to the entrance of the programming loop. The next frequency BC and AC values do depend on previous frequencies and therefore must consider the previous frequency’s values. The basic idea to remove biasing and constant re-iteration and testing cycles is to determine the proper range that each value can fall within prior to randomizing. This is so that only one randomization process is needed for each value and the range used is guaranteed to be within the proper range so a correction is not needed. For example, suppose a number is randomized without first determining the proper range. The number generated could be < -10 dB or > 25 dB. One could test for this situation and set the value = -10 dB or = 25 dB, but this would bias the randomization process to -10 and 25 dB levels. Another solution is to randomize and then test the range. If it’s not within the range, then randomize again. This removes biasing, but uses resources on constant re-iteration. The appropriate solution to both of these issues is to first determine the proper range and then randomize. This solution is determined here by inductive reasoning.

40

Page 41: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

According to the diagram, the AC value for Ear 0 is the first value determined for any particular frequency. This value is limited only by the AC value of the previous frequency (the only known value that limits it) and therefore requires no induction; the range is simply AC of the previous frequency + or – 10 dB (limited to -10 dB and +25 dB). The next value determined for a particular frequency is the BC value for Ear 0. In terms of already-known values, this value is dependent upon the BC of the previous frequency and the AC value just determined. A table is constructed that shows all possible combinations and the expected minimum and maximum range values.diffACcurBCpre

vrandMin randMax diffACcurBCprev - dB difference

between the BC value of the same ear for the previous frequency and the AC value just determined (BC – AC).

The second entry can be interpreted as: If the BC value is 5 dB higher than the AC value, then we expect the BC value for the current frequency to be at the same dB value as the AC value or 5 dB lower. All other lines follow the same reasoning

10 ACcur ACcur5 ACcur - 5 ACcur0 ACcur - 10 ACcur-5 ACcur - 10 ACcur

-10 ACcur - 10 ACcur-15 ACcur - 10 ACcur - 5-20 ACcur - 10 ACcur -

10Table 1 – Proper range for the BC value for Ear 0From Table 1 it is possible to construct a conditional statement that determines the minimum and maximum range values

if (diffACcurBCprev > 0)randMin = ACcur + diffACcurBCprev – 10;

elserandMin = ACcur – 10;

if (diffACcurBCprev < -10)randMax = ACcur + diffACcurBCprev + 10;

elserandMax = ACcur;

The next value to be determined in the same frequency is the BC value for the opposite ear (ear 1). This value is dependent only on the known values of BC for the previous frequency (same ear 1, within 10 dB) and the BC for the current frequency (opposite ear 0, within 5 dB). Again, a table is constructed that determines the expected range for the value to fall within.

diffBC1prevBC0cur

randMin randMax diffBC1prevBC0cur – The difference between the BC value for ear 1 for the previous frequency and the BC value for ear 0 for the current frequency. (BC1prev – BC0cur)

The final line can be interpreted as: If the difference indicates that BC1prev is 15 dB lower than BC0cur then the only situation that satisfies the

15 BC0cur + 5

BC0cur + 5

10 BC0cur BC0cur + 5

5 BC0cur – 5

BC0cur + 5

0 BC0cur – 5

BC0cur + 5

41

Page 42: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

guidelines is when the BC value for ear 1 for the current frequency is 5 dB less than BC0cur.

-5 BC0cur – 5

BC0cur + 5

-10 BC0cur – 5

BC0cur

-15 BC0cur – 5

BC0cur – 5

Table 2 - Proper range for the BC value for Ear 1

From Table 2 it is possible to construct a conditional statement that determines the minimum and maximum range values for the BC value of ear 1 for the current frequency

if (diffBC1prevBC0cur > 5)randMin = BC0cur + diffBC1prevBC0cur – 10;

elserandMin = BC0cur - 5;

if (diffBC1prevBC0cur < -10)randMax = BC0cur + diffBC1prevBC0cur + 10;

elserandMax = BC0cur + 5;

The final value to be determined is AC1 (AC value for ear 1) for the current frequency. This one is a bit trickier to determine as it depends on 3 known values. All other values have only depended on 2 or less up until now. This value depends on: AC1 of previous frequency, BC1 of current frequency, and AC0 of current frequency. For now we’ll construct the table and reason a formula for the minimum range case. The maximum range case is where the third criterion must be considered.To start off, consider the fact that the AC1 value is dependent on the BC1 of the current frequency and the AC1 of the previous frequency. This consideration leads to the following table:

42

Page 43: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

Figure 1 – Example pathology requiring criterion 3

diffBCcurACprev

randMin randMax diffBCcurACprev – The difference between the AC value for ear 1 for the previous frequency and the BC value for ear 1 for the current frequency. (ACprev – BCcur)

The fourth line can be interpreted as: If the difference indicates that AC of the previous frequency is 5 dB higher than BC of the current frequency, then we expect the AC of the current frequency to be equal to BC of the current frequency or up to 10 dB higher

20 BCcur + 10

BCcur + 10

15 BCcur + 5 BCcur + 10

10 BCcur BCcur + 10

5 BCcur BCcur + 10

0 BCcur BCcur + 10

-5 BCcur BCcur + 5-10 BCcur BCcur Table 3 - Proper range for the AC value for Ear 1

From Table 3 it is possible to construct a conditional statement that determines the minimum of the range

if (diffBCcurACprev > 10)randMin = BCcur + diffBCcurACprev – 10;

elserandMin = BCcur;

Consider Figure 1 to the left. Notice that in order to comply with the guideline that “AC values between neighboring frequencies must be within 10 dB” does not interfere with the guideline that “AC values between both ears at the same frequency must be within 10 dB” for the minimum case because the AC value cannot be less than the BC value for the same ear. Therefore the above code works for the minimum case for all indivual cases. However, the guideline “AC values between both ears at the same frequency must

be within 10 dB” does interfere with the maximum case.

Notice that the AC0 (Blue cross @ 500 HZ) value controls where the maximum value can be only if AC0 < BC1 (Red caret @ 500 Hz) and AC0 will never be less than BC1 by more than 5 dB. Therefore, we can set our maximum limit based on AC0 instead of BC1 in the event that AC0 < BC1. The results of this are reflected in the following lines of code:

43

Page 44: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

if (BC1cur > AC0cur)whichMax = AC0cur;

elsewhichMax = BC1cur;

if (diffBCcurACprev < 0)randMax = whichMax + diffBCcurACprev + 10;

elserandMax = whichMax + 10;

As a final note, the program randomizes between values of -2 and 5. This is because randomizing between -10 and 25 dB can result in values such as 14, or 8, which are not valid values on an audiogram (audiograms have a spacing of 5 dB). At the end of the randomization process, the program takes the random numbers generated and then multiplies them by 5 to ensure that they are aligned to the 5 dB separations of the audiogram.

B. Meniere’s Disease Randomization ProcessMatt Harris9/16/2011The bad ear has a flat loss, so it’s best to just shift the normal hearing values generated to a higher dB range.Conditions:

Normal Hearing ranges between -10 dB and 25 dB. We do not wish to test Air Conduction Masking for this pathology. The bad ear values must range between 30 and Air Conduction limits. Good ear will maintain all normal hearing values Bad ear will shift the normal hearing values to within the bad range except for

unmasked bone values Masked bone values will be original bone values plus the offset

Steps: Generate the normal hearing pathology for both ears Randomize between left and right ear for the “bad ear” Determine minimum BC value generated for the bad ear (minBC) Randomize an offset between randMin and randMax

o The range begins at 30 dB, and the minimum value must fall at 30 dB or higher

44

Page 45: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

o Therefore, 30 – minBC will be the minimum offset allowed (randMin)o Example: a minBC of -10 will require a 40 dB offset to be within range.o For the randMax, this will depend on the BC value for the other ear at the

same frequency to prevent the requirement for Air Masking. Air Conduction Masking required when ACTE – IA ≥ BENTE

IA will be considered to be 60 for inserts Therefore, randMax = BCgood ear + 55 – ACbad ear

Add the offset to the AC values for the bad ear Maintain BC (unmasked) values for the bad ear at original values Add the offset to the BC (unmasked) values and make these values the masked

BC value

C. Presbycusis RandomizationPresbycusis may be modeled using a parabola. The following is an algorithm to determine bone conduction values for one ear. Air conduction values for the same ear will equal the same distance from the bone values in the new curve. Similarly, Bone conduction of the other ear will be the original difference, and Air conduction for this ear will be the original difference as well.

Using the normal hearing pathology, determine differences between key values in the pathology to be used later

o Determine differences between AC and BC for the both ears for 1000, 2000, 4000 and 8000 Hz (2 ears, 2 arrays)

o Determine the difference between BC for both ears for 1000, 2000, 4000 and 8000 Hz

3 points are needed to solve an equation for a parabolao Naturally, the start point 0 (250 Hz) and the end point 5 (8000 Hz) are

great choices to useo The second point shall be 2 (1000 Hz) because this is the point where

hearing begins to fall off for the presbycusis pathology Points on the X axis indicate index of the array used in the program Points on the Y axis are true dB values because these values are stored in the

index specified by X and used by the program to map the pathologies

The 3 points chosen are (0 , y0 ), (2 , y2) and (5 , y5 ). The equation for a parabola is

y=a x2+bx+c Using the points described above we can see that

y0=0+0+cy2=4 a+2b+cy5=25 a+5 b+c

45

Page 46: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

This system of equations can be written in matrix form as

[ 0 0 14 2 125 5 1][abc ]=[ y0

y2

y5]

To solve for the coefficients of the parabola we can find the inverse matrix

[1

10−16

115

−710

56

−215

1 0 0][ y0

y2

y5]=[abc ]

This transformation will give the coefficients of the parabola once y0, y2, and y5 are known

Choosing values for y0, y2, and y5 are given by the following algorithmo y0 (and y1) based on 250 Hz normal hearing pathology

o y2 must be less than y0 and y1 for the presbycusis pathology:

Determine the largest between y0 and y1

Randomly add 5 to 15 dB to the largest, this is y2

o y5 must be the lowest point, and must not exceed 80 dB

Minimum y5 is y2+15 to accommodate y3 and y4

Minimum is 45 dB, whichever is greater Maximum y5 is 80 dB Randomize between these min and max values, this is y5

Once these three points are known, the coefficients of the parabolic equation may be solved

Using the parabolic equation, determine values for y3 and y4 by substituting x=3 and x=4 respectively for these values.

The result of these two points from the parabola will be floating point values and will more than likely not be a multiple of 5

Randomly round up or down to the nearest multiple of 5 (regardless of closest multiple)

o Divide by 5o Randomly floor or ceiling this value and multiply by 5o The result is y3 and y4

All points for the bone value for one ear have been determined. Adjust the AC values by adding their original difference from the normal BC values to the new BC values

o The differences were determined prior to any value changingo AC=BC+diff

46

Page 47: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

To generate values for the next earo y0 and y1 will be original normal hearing values

o y2 through y5 will have the same differences from the other ear as

determined at the start of this procedure.o AC values will have the same differences to the same ear BC values as

determined at the start of this procedure.

Evaluation ModeEvaluation Mode is an HTML display of student responses compared to the correct answers. This is a tool for instructors to use to evaluate student progress in learning masking. Thresholds are displayed for air conduction (AC), bone conduction (BC), masking air conduction (ACm), and bone conduction (BCm). A color code is used to describe student responses. The numbers displayed in white represent the correct answers, or theoretical answers, determined by the program. Student responses can be shown in green, indicating a correct answer, yellow which indicates an incorrect threshold, and red, indicating incorrect audiometer settings. This provides additional information to the instructor. Furthermore, the instructor can click on the student response to obtain more information regarding the student answer to determine where the student is having difficulty, information here includes maximum and minimum masking levels, audiometer settings, suh as transducer, L/R ear, etc. In addition, for color blind individuals, a bracket system is used to differentiate the different colors.

Evaluation Mode Workshop (12/1/2011)

47

Page 48: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

We invited 1st year AuD students and undergraduate students in speech language hearing sciences who had completed the introduction audiology course to a workshop in Heavilon. Students were provided with pizza and the program layout was shown and explained as well as a general overview of how to use the program. Students were then set up in a computer lab where they tested a virtual patient in evaluation mode. We monitored their progress and took note of their feedback they provided as they went. We did have to provide significant help to the undergraduate students has they had limited knowledge regarding masking. The program did crash a few times and we took note of this. Some of the information we gathered from observing students included:

Program appeared slow for grad students and would crash. Undergrads had difficulty navigating the program, finding correct settings. Some students had difficulty plotting on the audiogram correctly, perhaps due to

size.In addition, we provided a survey of questions regarding the program that students filled out after using the program, as seen below.

Workshop Survey Feedback (12/1/2011)Does the program seem intuitive? Is it easy to use/navigate?

Not as an undergrad. Haven’t seen audiometer style or used it in class.Once you understand where everything is, it is easy to navigate. Labeling could be more clear with undergrads.The audiometer is just like the ones in clinic.Easy to use- need to pay attention when marking audiogram that it marks it right- could be better if larger- new window?Inter-octave freqs would be more realistic to clinicAs 1st year grad student, program is pretty easy to use. Not sure how undergrads would do. The audiogram is a bit small.Yes. Looks like what we use in clinic

Were there any bugs or problems in the program during your session? Was any information on the screen incorrect?

Yes. “Don’t send” error message when plotting Right AC on young girl.Question about the Eval report for maskingWhen I was almost done masking for BC in the final ear the program crashed right before I could finish. I was quickly pushing the present button when it

48

Page 49: EPICS SLAC Virtual Lab Design Documentation Documents...  · Web viewThis lack of vibration ... When masking noise is used for pure tone air conduction and pure tone bone conduction

crashed.No. Meniere’s disease bug free.I got an error report my first time as I was trying to find my correct spot on the audiogram.Masking wouldn’t work, percent correct didn’t update.

Did the patient/case you used have a fitting HL for the given disorder? Were all of the values correct, including masking values?

Yes (3) N/A (2)It looks like a high freq SNHL in the RE. The audiogram seemed to match what I would expect that to look like.

Any other comments or areas for future improvement?

Be able to use marking, wrong hand raiseAudiogram was very small and hard to plot.Looks good!Maybe a masking calculator or notes box that you could select when you’re confused or stuck on a certain freq to help with practice.

49