ati.py modyfied with samplimg period