<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def visibility(self, strip_pos, particle_pos):
 """ Compute particle visibility based on distance between current strip position being rendered and particle position. A value of 0.0 is returned if they are >= one aperture away, values between 0.0 and 1.0 are returned if they are less than one aperature apart. """

        dist = abs(particle_pos - strip_pos)
        if dist > self.half_size:
            dist = self._size - dist
        if dist < self.aperture:
            return (self.aperture - dist) / self.aperture
        else:
            return 0