bmtool 0.6.8.8__py3-none-any.whl → 0.6.9__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bmtool/SLURM.py CHANGED
@@ -6,6 +6,7 @@ import requests
6
6
  import shutil
7
7
  import time
8
8
  import copy
9
+ import numpy as np
9
10
 
10
11
 
11
12
  def check_job_status(job_id):
@@ -205,12 +206,12 @@ class SimulationBlock:
205
206
  case_output_dir = os.path.join(block_output_dir, case_name) # Create case-specific output folder
206
207
  os.makedirs(case_output_dir, exist_ok=True)
207
208
 
208
- batch_script_path = os.path.join(block_output_dir, 'script.sh')
209
+ batch_script_path = os.path.join(block_output_dir, f'{case_name}_script.sh')
209
210
  additional_commands_str = "\n".join(self.additional_commands)
210
211
  # Conditional account linegit
211
212
  account_line = f"#SBATCH --account={self.account}\n" if self.account else ""
212
213
  env_var_component_path = f"export COMPONENT_PATH={self.component_path}" if self.component_path else ""
213
- mem_per_cpu = int(int(self.mem)/int(self.ntasks))
214
+ mem_per_cpu = int(np.ceil(int(self.mem)/int(self.ntasks))) # do ceil cause more mem is always better then less
214
215
 
215
216
  # Write the batch script to the file
216
217
  with open(batch_script_path, 'w') as script_file:
@@ -333,6 +334,7 @@ def globus_transfer(source_endpoint, dest_endpoint, source_path, dest_path):
333
334
  """
334
335
  Transfers file using custom globus transfer function.
335
336
  For more info see https://github.com/GregGlickert/transfer-files/blob/main/globus_transfer.sh
337
+ work in progress still... kinda forgot about this
336
338
  """
337
339
  relative_source_path = get_relative_path(source_endpoint, source_path)
338
340
  if relative_source_path is None:
@@ -379,7 +381,7 @@ class BlockRunner:
379
381
  source_dir = block.component_path
380
382
  destination_dir = f"{source_dir}{i+1}"
381
383
  block.component_path = destination_dir
382
- shutil.copytree(source_dir, destination_dir) # create new components folder
384
+ shutil.copytree(source_dir, destination_dir,dirs_exist_ok = True) # create new components folder
383
385
  print(f"skipping json editing for block {block.block_name}",flush=True)
384
386
  else:
385
387
  if len(self.blocks) != len(self.param_values):
@@ -390,7 +392,7 @@ class BlockRunner:
390
392
  destination_dir = f"{source_dir}{i+1}"
391
393
  block.component_path = destination_dir
392
394
 
393
- shutil.copytree(source_dir, destination_dir) # create new components folder
395
+ shutil.copytree(source_dir, destination_dir,dirs_exist_ok = True) # create new components folder
394
396
  json_file_path = os.path.join(destination_dir,self.json_file_path)
395
397
 
396
398
  if self.syn_dict == None:
@@ -439,7 +441,7 @@ class BlockRunner:
439
441
  source_dir = block.component_path
440
442
  destination_dir = f"{source_dir}{i+1}"
441
443
  block.component_path = destination_dir
442
- shutil.copytree(source_dir, destination_dir) # create new components folder
444
+ shutil.copytree(source_dir, destination_dir,dirs_exist_ok = True) # create new components folder
443
445
  print(f"skipping json editing for block {block.block_name}",flush=True)
444
446
  else:
445
447
  if block.component_path == None:
@@ -450,7 +452,7 @@ class BlockRunner:
450
452
  destination_dir = f"{source_dir}{i+1}"
451
453
  block.component_path = destination_dir
452
454
 
453
- shutil.copytree(source_dir, destination_dir) # create new components folder
455
+ shutil.copytree(source_dir, destination_dir,dirs_exist_ok = True) # create new components folder
454
456
  json_file_path = os.path.join(destination_dir,self.json_file_path)
455
457
 
456
458
  if self.syn_dict == None:
bmtool/analysis/lfp.py CHANGED
@@ -768,7 +768,6 @@ def cwt_spectrogram_xarray(x, fs, time=None, axis=-1, downsample_fs=None,
768
768
  fs: sampling frequency (Hz)
769
769
  axis: dimension index of time axis in x
770
770
  downsample_fs: downsample to the frequency if specified
771
- time_unit: unit of time in seconds
772
771
  channel_coords: dictionary of {coordinate name: index} for channels
773
772
  cwt_kwargs: keyword arguments for cwt_spectrogram()
774
773
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bmtool
3
- Version: 0.6.8.8
3
+ Version: 0.6.9
4
4
  Summary: BMTool
5
5
  Home-page: https://github.com/cyneuro/bmtool
6
6
  Download-URL:
@@ -1,4 +1,4 @@
1
- bmtool/SLURM.py,sha256=umHYGUX2HDlZr6Zo89wQekGrK9mZdAi0rBdCA7a--hE,19904
1
+ bmtool/SLURM.py,sha256=PST_jOD5ZmwbJj15Tgq3UIvdq4FYN4EkPuDt66P8OXU,20136
2
2
  bmtool/__init__.py,sha256=ZStTNkAJHJxG7Pwiy5UgCzC4KlhMS5pUNPtUJZVwL_Y,136
3
3
  bmtool/__main__.py,sha256=TmFkmDxjZ6250nYD4cgGhn-tbJeEm0u-EMz2ajAN9vE,650
4
4
  bmtool/bmplot.py,sha256=ymyrNBctZoglsNA28733mXzM_l4b_3JIchXkQa2V2XE,54099
@@ -9,7 +9,7 @@ bmtool/plot_commands.py,sha256=Tqujyf0c0u8olhiHOMwgUSJXIIE1hgjv6otb25G9cA0,12298
9
9
  bmtool/singlecell.py,sha256=XZAT_2n44EhwqVLnk3qur9aO7oJ-10axJZfwPBslM88,27219
10
10
  bmtool/synapses.py,sha256=gIkfLhKDG2dHHCVJJoKuQrFn_Qut843bfk_-s97wu6c,54553
11
11
  bmtool/analysis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- bmtool/analysis/lfp.py,sha256=TfPSLIh2LqbWTRFnYwBMBpfbj6yxyhC7EAQM1e2H4qs,33609
12
+ bmtool/analysis/lfp.py,sha256=KTDMzqhkpTI308sWqoJnbHeCMSFScaJCO4u50Kd4FzA,33570
13
13
  bmtool/analysis/spikes.py,sha256=qqJ4zD8xfvSwltlWm_Bhicdngzl6uBqH6Kn5wOMKRc8,11507
14
14
  bmtool/debug/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  bmtool/debug/commands.py,sha256=AwtcR7BUUheM0NxvU1Nu234zCdpobhJv5noX8x5K2vY,583
@@ -19,9 +19,9 @@ bmtool/util/commands.py,sha256=zJF-fiLk0b8LyzHDfvewUyS7iumOxVnj33IkJDzux4M,64396
19
19
  bmtool/util/util.py,sha256=00vOAwTVIifCqouBoFoT0lBashl4fCalrk8fhg_Uq4c,56654
20
20
  bmtool/util/neuron/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  bmtool/util/neuron/celltuner.py,sha256=xSRpRN6DhPFz4q5buq_W8UmsD7BbUrkzYBEbKVloYss,87194
22
- bmtool-0.6.8.8.dist-info/licenses/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
23
- bmtool-0.6.8.8.dist-info/METADATA,sha256=IqLuFdtSCGW_gxwgU8vD543KUj19fP-dhTbeSG_6HNg,20478
24
- bmtool-0.6.8.8.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
25
- bmtool-0.6.8.8.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
26
- bmtool-0.6.8.8.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
27
- bmtool-0.6.8.8.dist-info/RECORD,,
22
+ bmtool-0.6.9.dist-info/licenses/LICENSE,sha256=qrXg2jj6kz5d0EnN11hllcQt2fcWVNumx0xNbV05nyM,1068
23
+ bmtool-0.6.9.dist-info/METADATA,sha256=D2t3-ElmKHpCIuvyafzqlihr6xaeeG-0aabZJXkeXMU,20476
24
+ bmtool-0.6.9.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
25
+ bmtool-0.6.9.dist-info/entry_points.txt,sha256=0-BHZ6nUnh0twWw9SXNTiRmKjDnb1VO2DfG_-oprhAc,45
26
+ bmtool-0.6.9.dist-info/top_level.txt,sha256=gpd2Sj-L9tWbuJEd5E8C8S8XkNm5yUE76klUYcM-eWM,7
27
+ bmtool-0.6.9.dist-info/RECORD,,