

import numpy as np

def combine_in_out_field_loops(in_vec, out_vec):
    """

    Parameters
    ----------
    in_vec
    out_vec

    Returns
    -------

    """
    return np.vstack((in_vec, out_vec))


def build_loop_from_mat(loop_mat, num_steps):
    """

    Parameters
    ----------
    loop_mat
    num_steps

    Returns
    -------

    """
    return np.vstack((loop_mat[0, :int(num_steps / 4) + 1],
                      loop_mat[1],
                      loop_mat[0, int(num_steps / 4) + 1: int(num_steps / 2)]))


def get_noise_vec(num_pts, noise_coeff):
    """

    Parameters
    ----------
    num_pts
    noise_coeff

    Returns
    -------

    """
    return np.ones(num_pts) * (1 + 0.5 * noise_coeff) - np.random.random(num_pts) * noise_coeff



import numpy as np
import os

beps_image_folder = os.path.abspath(os.path.join(os.path.realpath(__file__), '../beps_data_gen_images'))

def combine_in_out_field_loops(in_vec, out_vec):
    """

    Parameters
    ----------
    in_vec
    out_vec

    Returns
    -------

    """
    return np.vstack((in_vec, out_vec))


def build_loop_from_mat(loop_mat, num_steps):
    """

    Parameters
    ----------
    loop_mat
    num_steps

    Returns
    -------

    """
    return np.vstack((loop_mat[0, :int(num_steps / 4) + 1],
                      loop_mat[1],
                      loop_mat[0, int(num_steps / 4) + 1: int(num_steps / 2)]))


def get_noise_vec(num_pts, noise_coeff):
    """

    Parameters
    ----------
    num_pts
    noise_coeff

    Returns
    -------

    """
    return np.ones(num_pts) * (1 + 0.5 * noise_coeff) - np.random.random(num_pts) * noise_coeff

Define a path to the image folder for fake beps generator
Define a path to the image folder for fake beps generator

Path is defined in beps_gen_utils
Users can still provide their own images if they want.
  
  
  import numpy as np
+ import os
+ 
+ beps_image_folder = os.path.abspath(os.path.join(os.path.realpath(__file__), '../beps_data_gen_images'))
  
  def combine_in_out_field_loops(in_vec, out_vec):
      """
  
      Parameters
      ----------
      in_vec
      out_vec
  
      Returns
      -------
  
      """
      return np.vstack((in_vec, out_vec))
  
  
  def build_loop_from_mat(loop_mat, num_steps):
      """
  
      Parameters
      ----------
      loop_mat
      num_steps
  
      Returns
      -------
  
      """
      return np.vstack((loop_mat[0, :int(num_steps / 4) + 1],
                        loop_mat[1],
                        loop_mat[0, int(num_steps / 4) + 1: int(num_steps / 2)]))
  
  
  def get_noise_vec(num_pts, noise_coeff):
      """
  
      Parameters
      ----------
      num_pts
      noise_coeff
  
      Returns
      -------
  
      """
      return np.ones(num_pts) * (1 + 0.5 * noise_coeff) - np.random.random(num_pts) * noise_coeff
  
Define a path to the image folder for fake beps generator
## Code Before:


import numpy as np

def combine_in_out_field_loops(in_vec, out_vec):
    """

    Parameters
    ----------
    in_vec
    out_vec

    Returns
    -------

    """
    return np.vstack((in_vec, out_vec))


def build_loop_from_mat(loop_mat, num_steps):
    """

    Parameters
    ----------
    loop_mat
    num_steps

    Returns
    -------

    """
    return np.vstack((loop_mat[0, :int(num_steps / 4) + 1],
                      loop_mat[1],
                      loop_mat[0, int(num_steps / 4) + 1: int(num_steps / 2)]))


def get_noise_vec(num_pts, noise_coeff):
    """

    Parameters
    ----------
    num_pts
    noise_coeff

    Returns
    -------

    """
    return np.ones(num_pts) * (1 + 0.5 * noise_coeff) - np.random.random(num_pts) * noise_coeff

## Instruction:
Define a path to the image folder for fake beps generator
## Code After:


import numpy as np
import os

beps_image_folder = os.path.abspath(os.path.join(os.path.realpath(__file__), '../beps_data_gen_images'))

def combine_in_out_field_loops(in_vec, out_vec):
    """

    Parameters
    ----------
    in_vec
    out_vec

    Returns
    -------

    """
    return np.vstack((in_vec, out_vec))


def build_loop_from_mat(loop_mat, num_steps):
    """

    Parameters
    ----------
    loop_mat
    num_steps

    Returns
    -------

    """
    return np.vstack((loop_mat[0, :int(num_steps / 4) + 1],
                      loop_mat[1],
                      loop_mat[0, int(num_steps / 4) + 1: int(num_steps / 2)]))


def get_noise_vec(num_pts, noise_coeff):
    """

    Parameters
    ----------
    num_pts
    noise_coeff

    Returns
    -------

    """
    return np.ones(num_pts) * (1 + 0.5 * noise_coeff) - np.random.random(num_pts) * noise_coeff
