Swainsonine can be detected and quantified through various analytical techniques, such as high-performance liquid chromatography (HPLC) and mass spectrometry. These methods allow for accurate measurement of swainsonine concentrations, helping to assess the risk assessment of different astragalus products.