<commit_before>from __future__ import division, print_function
import opticstools as ot
import numpy as np
import matplotlib.pyplot as plt
import scipy.ndimage as nd
import scipy.misc
import ipdb
import time
plt.ion()

try:
    import pyfftw
    pyfftw.interfaces.cache.enable()
    pyfftw.interfaces.cache.set_keepalive_time(1.0)
    nthreads = 16 
    print("WARNING: using pyfftw with {:d} threads...".format(nthreads))
except:
    nthreads = 0
    print("WARNING: I could not import pyfftw, so I am using numpy fft routines instead...")


class Wavefront():
    """This is a base wavefront class. 
    
    It not only stores the wavefront, but 
    includes propagation and application of the telescope pupil function. As
    a start at least, there is only 1 wavelength. 
    
    Parameters
    ----------
    wave: float
        wavelength in meters
    m_per_px: float
        meters per pixel
    sz: int
        size of the wavefront
    pupil: dict
        Pupil type and parameters."""
<commit_msg>Made warning message showing number of threads used in pyfftw less ambiguous<commit_after>from __future__ import division, print_function
import opticstools as ot
import numpy as np
import matplotlib.pyplot as plt
import scipy.ndimage as nd
import scipy.misc
import ipdb
import time
plt.ion()

try:
    import pyfftw
    pyfftw.interfaces.cache.enable()
    pyfftw.interfaces.cache.set_keepalive_time(1.0)
    nthreads = 16 
    print("WARNING: in wavefront.py I am using pyfftw with {:d} threads...".format(nthreads))
except:
    nthreads = 0
    print("WARNING: in wavefront.py I could not import pyfftw, so I am using numpy fft routines instead...")


class Wavefront():
    """This is a base wavefront class. 
    
    It not only stores the wavefront, but 
    includes propagation and application of the telescope pupil function. As
    a start at least, there is only 1 wavelength. 
    
    Parameters
    ----------
    wave: float
        wavelength in meters
    m_per_px: float
        meters per pixel
    sz: int
        size of the wavefront
    pupil: dict
        Pupil type and parameters."""

{'fraction_non_alphanumeric': 0.07351555136663525, 'fraction_numerical': 0.005655042412818096, 'mean_word_length': 2.832129963898917, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '306451', 'n_tokens_mistral': 654, 'n_tokens_neox': 619, 'n_words': 247}