Check Pentax K5 sensor stain or dust with Photivo
since I'm a Pentax user myself I'm following the latest discussions about faulty sensors in the Pentax K5 with interest. Many people are not sure how to reproduce and identify them, so here is a small tutorial using Photivo. You'll see virtually everything about your sensor, probably more than you'll like
First you need a plain lit shot without detail. Just proceed as follows. Set your camera to Av (aperture priority) and choose aperture 8, lowest ISO setting and shoot in RAW. Assuming you have a white wall or ceiling point at it and take a shot, while slightly moving the camera (just to blur the small scale detail on your wall). In the end you should have a middle grey image with no obvious information (if the white balance is off it may have a color tint, but nothing more.)
Open that image in Photivo, and disable all filters besides RGB Brigthen (Reinhard) and Sigmoidal contrast on the output tab (you may check with 'A'). To get a cleaner result set the spot white balance with the button in the white balance tool box on the camera tab. Below in the demosaicing box you may enable the Badpixel reduction. Looking at your image, it may seem that not much happened, besides that it is now a middle grey...
The essential filter is the Local contrast stretch 1 on the Lab Color/Contrast tab. First dial down it's masking to 0. Leave Radius and Feather untouched and dial up opacity to 1. Any result? You'll see every small detail on your sensor, I attached the result of my Pentax K20 sensor before cleaning, you see the dust spots, and the columns of the pixels on the sensor. You also see the faulty left side of the Pentax K20 sensor.