//  [python]
def kinms_sampleFromArbDist_oneSided(self, sbRad, sbProf, nSamps, diskThick):
        """
        Samples cloudlets from radial profiles provided given that inClouds is not provided in the __init__. 
        
        :param sbRad:
                (numpy array) Radius vector for surface brightness profile (units of arcseconds).
        :param sbProf: 
                (numpy array) Surface brightness profile (arbitrarily scaled) as a function of 'sbrad'.
        :param nSamps: 
                (int) Number of cloudlets to use to create the model. Large numbers will reduce numerical noise (especially
                in large cubes), at the cost of increasing runtime.
        :param diskThick: 
                (numpy array) The disc scaleheight in arcseconds. If a single value then this is used at all radii. If an array/list
                then it should have the same length as 'sbrad', and will be the disc thickness as a function of that.
        :return inClouds:
            (numpy array) 3 dimensional array of cloudlet positions within the cube initialised by KinMS().
        """
        if self.verbose: 
            print('Generating cloudlets,', end =' ')


        
        # Randomly generate the radii of clouds based on the distribution given by the brightness profile.
        px = scipy.integrate.cumtrapz(sbProf * 2 * np.pi * abs(sbRad), abs(sbRad), initial=0) #  Integrates the surface brightness profile
        px /= max(px) # Normalised integral of the surface brightness profile
        
        r_flat = np.interp(self.randompick_r,px,sbRad)
        
        # Generates a random phase around the galaxy's axis for each cloud.
        
        phi = self.randompick_phi

        
        # Find the thickness of the disk at the radius of each cloud, and generates a random (uniform) z-position satisfying |z|<disk_here.
        if np.any(diskThick != 0):
            if len(diskThick) > 1 and len(diskThick) != len(sbRad):
                raise KinMSError('\n \n ... Please make sure the length of diskThick is the same as that of sbRad!')

            elif len(diskThick) > 1:
                diskThick = np.array(diskThick)
                diskThick_here = np.interp(r_flat,sbRad, diskThick)
                if self.verbose: print('Using the scale height profile provided.')
            else:
                diskThick_here = diskThick
                if self.verbose: print('Using an exponential scale height of ' + str(diskThick) + '.')
            rng3 = np.random.RandomState(self.seed[2])
            z_pos = diskThick_here * rng3.exponential(1,nSamps)*rng3.choice([-1,1],size=nSamps)
        else:
            if self.verbose: print('Using a thin disc assumption.')
            z_pos = 0
        

        # Calculate the x & y position of the clouds in the x-y plane of the disk.
        r_3d = np.sqrt(r_flat ** 2 + z_pos ** 2)
        sintheta=np.sqrt(1-(z_pos / r_3d)**2)
        x_pos = r_3d * np.cos(phi) * sintheta
        y_pos = r_3d * np.sin(phi) * sintheta

        # Generates the output array
        inClouds = np.empty((nSamps, 3))
        inClouds[:, 0] = x_pos
        inClouds[:, 1] = y_pos
        inClouds[:, 2] = z_pos
        
        return inClouds