Notebook for calculation a VarData Test Case and have a Unit Number for Comparison
For more speed calculations see VarData Speed Calculations
In [1]:
import math
import datetime
def varData_speedCalc_comparison(test_case, test_title, test_description, test_time=None, cups_speed=250.0, substrate_size_mm=None, substrate_size_px=None, dpi_image=[360.0,360.0]):
inch2mm = 25.4 # mm/inch
bpp = 4.0 # bit/px
if test_time == None:
test_time = datetime.datetime.now()
# cup speed
cup_speed_sec = cups_speed / 60 # cup/sec
cup_cycle = 1/cup_speed_sec # sec
# pixel pitch
pixel_pitch = [inch2mm / dpi_image[0] , inch2mm / dpi_image[1]]# mm
# Substrate size (image size)
if not(substrate_size_px == None):
substrate_size_mm = [int(math.ceil(substrate_size_px[0]/pixel_pitch[0])), int(math.ceil(substrate_size_px[1]/pixel_pitch[1]))]
substrate_size_px = substrate_size_px
elif not(substrate_size_mm == None):
substrate_size_mm = substrate_size_mm
substrate_size_px = [int(math.ceil(substrate_size_mm[0]/pixel_pitch[0])), int(math.ceil(substrate_size_mm[1]/pixel_pitch[1]))]
# print speed
print_speed = (substrate_size_mm[0]/cup_cycle) # mm/s
print_speed_area = (substrate_size_mm[0]*substrate_size_mm[1])/cup_cycle # mm^2/s
# data size per image
image_size_bytes = (substrate_size_px[0]*substrate_size_px[1])*bpp/8 # bytes
# Print all results
print("------------------- {} -------------------".format(test_title))
print("-- Test Case: #{}".format(str(test_case)))
print("-- Test Time: {}".format(str(test_time)))
print("----------------------------------------------------------------")
print(test_description)
print("----------------------------------------------------------------")
print("Image info: {:.3f} mm x {:.3f} mm".format(substrate_size_mm[0], substrate_size_mm[1]))
print(" {:.3f} px x {:.3f} px".format(substrate_size_px[0], substrate_size_px[1]))
if image_size_bytes < 1024:
print(" {:.3f} Bytes".format(image_size_bytes))
elif image_size_bytes/1024 < 1024:
print(" {:.3f} kB".format(image_size_bytes/1024))
elif image_size_bytes/1024/1024 < 1024:
print(" {:.3f} MB".format(image_size_bytes/1024/1024))
else:
print(" {:.3f} GB".format(image_size_bytes/1024/1024/1024))
print("")
print("Cup info: {:.3f} cups/sec".format(cup_speed_sec))
print(" {:.3f} ms/cup".format(cup_cycle*1000))
print("")
print("Print Speed Linear {:.3f} mm/s => {:.3f} m/min".format(print_speed, print_speed/1000*60))
print("Print Speed Area {:.3f} mm^2/s => {:.3f} m^2/s".format(print_speed_area, print_speed_area*10e-7))
print("----------------------------------------------------------------")
In [2]:
test_case = 1 # Unique test number (UTN)
test_title = "Digiround Max Speed Test"
test_description = "Digiround Spectra PC \n CPU: i5-4570 \n RAM: 8GB 12800MHz \n SSD: 120GB \n 1 Gbps Ethernet Port for Calmar data"
#test_time = "2017-11-29 14:02:00" # if not existing uses current time
test_time = None
cups_speed = 250.0 # cups/min
substrate_size_mm = [280.0, 140.0] # [mm]
substrate_size_px = None # [px]
dpi_image = [360.0, 360.0] # [dpi] dpi_x and dpy_y
varData_speedCalc_comparison(test_case, test_title, test_description, test_time, cups_speed, substrate_size_mm, substrate_size_px, dpi_image)
In [3]:
test_case = 1 # Unique test number (UTN)
test_title = "Digiround Max Speed Test"
test_description = "Digiround Spectra PC \n CPU: i5-4570 \n RAM: 8GB 12800MHz \n SSD: 120GB \n 1 Gbps Ethernet Port for Calmar data"
#test_time = "2017-11-29 14:02:00" # if not existing uses current time
test_time = None
cups_speed = 120.0 # cups/min
substrate_size_mm = [280.0, 140.0] # [mm]
substrate_size_px = None # [px]
dpi_image = [360.0, 360.0] # [dpi] dpi_x and dpy_y
varData_speedCalc_comparison(test_case, test_title, test_description, test_time, cups_speed, substrate_size_mm, substrate_size_px, dpi_image)
In [4]:
test_case = 1 # Unique test number (UTN)
test_title = "WK308 120 cups/min + Ergosoft running"
test_description = "Spectra PC \n CPU: i5-4570 \n RAM: 24GB 12800MHz \n SSD: 223GB \n 1 Gbps Ethernet Port for Calmar data"
#test_time = "2017-11-29 14:02:00" # if not existing uses current time
test_time = None
cups_speed = 240.0 # cups/min
substrate_size_mm = None # [mm]
substrate_size_px = [3971, 2014] # [px]
dpi_image = [360.0, 360.0] # [dpi] dpi_x and dpy_y
varData_speedCalc_comparison(test_case, test_title, test_description, test_time, cups_speed, substrate_size_mm, substrate_size_px, dpi_image)