added doOptical to readopting.py