A system for calculating and calibrating an effective aperture size of an optical sensor , the system comprising: the optical sensor configured to scan a test pattern to generate a scan reflectance profile, SRP, wherein the test pattern comprises at least one test element which is a bar that is narrower than narrow bars of the test pattern, or a space that is narrower than narrow spaces of the test pattern; a processor in electronic communication with the optical sensor , the processor being configured to: calculate an element-reflectance value based on a comparison between a portion of the SRP associated with the at least one test element and portions of the SRP associated with the other elements in the test pattern, the element-reflectance value being calculated with respect to the at least one test element of the test pattern ; receive a reference graph associated with the test pattern , the reference graph having a curve that correlates element-reflectance values with aperture size for a plurality of reference SRPs generated by a plurality of reference optical sensors scanning the test pattern , the plurality of reference optical sensors having a plurality of known aperture sizes; and calculate the effective aperture size of the optical sensor based at least on interpolating the calculated element-reflectance value on the reference graph . the optical sensor configured to scan a test pattern to generate a scan reflectance profile, SRP, wherein the test pattern comprises at least one test element which is a bar that is narrower than narrow bars of the test pattern, or a space that is narrower than narrow spaces of the test pattern; a processor in electronic communication with the optical sensor , the processor being configured to: calculate an element-reflectance value based on a comparison between a portion of the SRP associated with the at least one test element and portions of the SRP associated with the other elements in the test pattern, the element-reflectance value being calculated with respect to the at least one test element of the test pattern ; receive a reference graph associated with the test pattern , the reference graph having a curve that correlates element-reflectance values with aperture size for a plurality of reference SRPs generated by a plurality of reference optical sensors scanning the test pattern , the plurality of reference optical sensors having a plurality of known aperture sizes; and calculate the effective aperture size of the optical sensor based at least on interpolating the calculated element-reflectance value on the reference graph . calculate an element-reflectance value based on a comparison between a portion of the SRP associated with the at least one test element and portions of the SRP associated with the other elements in the test pattern, the element-reflectance value being calculated with respect to the at least one test element of the test pattern ; receive a reference graph associated with the test pattern , the reference graph having a curve that correlates element-reflectance values with aperture size for a plurality of reference SRPs generated by a plurality of reference optical sensors scanning the test pattern , the plurality of reference optical sensors having a plurality of known aperture sizes; and calculate the effective aperture size of the optical sensor based at least on interpolating the calculated element-reflectance value on the reference graph . <EOS>