howardheaton / feasibility_fixed_point_networks

Feasibility algorithms (projection methods) with data-driven regularization
MIT License
4 stars 1 forks source link

Are S and A related to training and testing datasets in the code? #1

Closed syf0518 closed 1 year ago

syf0518 commented 1 year ago

Thank you for your contribution, it's wonderful.I'm trying to replace the LoDoPab dataset with the AAPM dataset, but I don't know how to get A and S.Are S and A related to training and testing datasets in the code?I'll appreciate it if you could tell me.

swufung commented 1 year ago

Thanks for the comment. The way we generated the A matrix was by building it using the ODL package.

The A matrix is dependent on the experiment type and the size of your data. In our case, for instance, the A matrix simulates computed tomography (CT) with parallel beams. We built this matrix using the operator discretization library (ODL) package. Depending on the resolution of the data and the number of angles/parallel beams you'd like to use, the size of A will change. You probably could use ODL to build it as well.

The S matrix is a regularization operator that encodes prior information. Common choices are a scaled diagonal (identity in our case), gradient, or laplacian operators.

Hope this answers your question.

syf0518 commented 1 year ago

Thank you for your reply.I tried to build A by odl.tomo.FanBeamGeometry, but I don't know how to convert it to matrix.Could you tell me the specific operation of generating matrix A?I'll appreciate it if you could tell me.

swufung commented 1 year ago

To build the matrix A explicitly, you can apply the odl operators to the columns of an identity matrix.

Something along the lines of for i in range(n_colums): A[i,:] = apply_odl_operator(Id[i,:])

where Id is an identity operator, and A is the matrix you're building. It's not the exact code but hope this helps.

syf0518 commented 1 year ago

Thank you for your reply,it helps me a lot.