Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with append in the first notebook #62

Open
mirhnius opened this issue Dec 12, 2023 · 1 comment
Open

Issue with append in the first notebook #62

mirhnius opened this issue Dec 12, 2023 · 1 comment

Comments

@mirhnius
Copy link

In the T1 and T2 relaxation and image contrast section, there is a tiny bug. You have tried to concatenate two data frames with append attribute. append is deprecated and if you try to run the cell, you will face an error. Use concate instead.

T1_dict = {'GM':1200, 'WM':800, 'CSF':4000, 'Bone':500}  
T2_dict = {'GM':110, 'WM':80, 'CSF':750, 'Bone':50}
T1_duration = np.arange(0,4500,500)
T2_duration = np.arange(0,500,100)
relax_df = pd.DataFrame()

for tissue,T1 in T1_dict.items():
    _df = pd.DataFrame()
    Mz = get_Mz(T1,T1_duration)
    _df['time'] = T1_duration
    _df['signal'] = Mz
    _df['relaxation'] = 'T1'
    _df['tissue'] = tissue

  relax_df = relax_df.append(_df)
  relax_df = pd.concat([relax_df,_df])
@nikhil153
Copy link
Collaborator

Yes, you are correct @mirhnius! Can you open a PR for this and the other issue to fix these bugs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants