use flattenAndPutDataInFolder instead of createPeriodicDataset