-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from dvm-shlee/main
Refactor and Ongoing Development in API Module
- Loading branch information
Showing
10 changed files
with
63 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from __future__ import annotations | ||
import numpy as np | ||
from typing import TYPE_CHECKING | ||
from .base import BaseHelper, is_all_element_same, BYTEORDER, WORDTYPE | ||
if TYPE_CHECKING: | ||
from ..analyzer import ScanInfoAnalyzer | ||
|
||
|
||
class FID(BaseHelper): | ||
"""requires visu_pars and aqcp to pars parameter related to the dtype of binary files | ||
Dependencies: | ||
acqp | ||
visu_pars | ||
Args: | ||
BaseHelper (_type_): _description_ | ||
""" | ||
def __init__(self, analobj: 'ScanInfoAnalyzer'): | ||
super().__init__() | ||
acqp = analobj.acqp | ||
|
||
if acqp: | ||
word_type = f'_{"".join(acqp["ACQ_word_size"].split("_"))}_SGN_INT' | ||
byte_order = f'{acqp["BYTORDA"]}Endian' | ||
self.dtype = np.dtype(f'{BYTEORDER[byte_order]}{WORDTYPE[word_type]}') | ||
else: | ||
self.fid_dtype = None | ||
self._warn("Failed to fetch 'fid_dtype' information because the 'acqp' file is missing from 'analobj'.") | ||
|
||
|
||
def get_info(self): | ||
return { | ||
'dtype': self.dtype, | ||
'warns': self.warns | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters